From 20e01b61e08c6dbc1e58fd05402b8d2dcfae19b0 Mon Sep 17 00:00:00 2001 From: Dawid Kubicki Date: Sun, 13 Jan 2019 16:56:55 +0100 Subject: [PATCH] routing added --- src/app/app-routing.module.ts | 17 ++++++++++---- src/app/app.component.html | 4 +--- .../status-list/status-list.component.html | 23 ++++++++++++++++--- .../status-list/status-list.component.less | 5 ++++ 4 files changed, 39 insertions(+), 10 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index d425c6f..0c94865 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,10 +1,19 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import { NgModule } from "@angular/core"; +import { Routes, RouterModule } from "@angular/router"; +import { AppComponent } from "./app.component"; +import { AdminComponent } from "./admin/admin.component"; +import { StatusListComponent } from "./status-list/status-list.component"; -const routes: Routes = []; +const routes: Routes = [ + { path: "", component: StatusListComponent }, + { + path: "admin", + component: AdminComponent + } +]; @NgModule({ imports: [RouterModule.forRoot(routes)], exports: [RouterModule] }) -export class AppRoutingModule { } +export class AppRoutingModule {} diff --git a/src/app/app.component.html b/src/app/app.component.html index d026d27..77943ec 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,6 +1,4 @@
- - - +
diff --git a/src/app/status-list/status-list.component.html b/src/app/status-list/status-list.component.html index cf80813..55c007e 100644 --- a/src/app/status-list/status-list.component.html +++ b/src/app/status-list/status-list.component.html @@ -5,13 +5,30 @@ - {{ device.lastStatus == 1 ? "Zajęte" : "Wolne" }} + {{ + device.lastStatus == 1 + ? "Zajęte" + : device.lastStatus == 0 + ? "Wolne" + : "Brak połączenia z czujnikiem" + }} diff --git a/src/app/status-list/status-list.component.less b/src/app/status-list/status-list.component.less index 6c551ce..1c8bd49 100644 --- a/src/app/status-list/status-list.component.less +++ b/src/app/status-list/status-list.component.less @@ -195,3 +195,8 @@ table { } } } + +.example-button-row button, +.example-button-row a { + margin-right: 8px; +}