From ccb9492e819251125d92aaf8d871af4a3293d356 Mon Sep 17 00:00:00 2001 From: insanity Date: Wed, 23 May 2018 18:08:59 +0900 Subject: [PATCH] state revert T^T --- package-lock.json | 5 +++++ package.json | 5 +++-- src/app/app-l10n.module.ts | 2 +- .../pages/probes/probe/probe-page.component.ts | 17 ++++++++++++++--- tsconfig.json | 13 ++++++++++++- 5 files changed, 35 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 60139e4..121c3c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7127,6 +7127,11 @@ "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, + "ngrx-store-logger": { + "version": "0.2.1", + "resolved": "https://nexus.loafle.net/repository/npm-all/ngrx-store-logger/-/ngrx-store-logger-0.2.1.tgz", + "integrity": "sha1-IW6ZyVJ888UIYu4rJ/6T++jChnE=" + }, "ngx-cookie-service": { "version": "1.0.10", "resolved": "https://nexus.loafle.net/repository/npm-all/ngx-cookie-service/-/ngx-cookie-service-1.0.10.tgz", diff --git a/package.json b/package.json index 11973b3..6d7989c 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "@ngrx/store": "^5.2.0", "@ngrx/store-devtools": "^5.2.0", "@overflow/commons-typescript": "^0.0.5", + "angular-google-recaptcha": "^1.0.3", "angular-l10n": "^4.1.5", "angularx-qrcode": "^1.1.0", "chart.js": "^2.7.2", @@ -43,6 +44,7 @@ "ip-cidr": "^1.1.2", "jquery": "^3.3.1", "moment": "^2.22.0", + "ngrx-store-logger": "^0.2.1", "ngx-cookie-service": "^1.0.10", "openssl": "^1.1.0", "primeng": "^5.2.4", @@ -51,8 +53,7 @@ "rxjs": "^5.5.8", "rxjs-fetch": "^2.1.6", "web-animations-js": "^2.3.1", - "zone.js": "^0.8.25", - "angular-google-recaptcha": "^1.0.3" + "zone.js": "^0.8.25" }, "devDependencies": { "@angular/cli": "1.6.5", diff --git a/src/app/app-l10n.module.ts b/src/app/app-l10n.module.ts index a31fe33..3799111 100644 --- a/src/app/app-l10n.module.ts +++ b/src/app/app-l10n.module.ts @@ -1,5 +1,5 @@ import { NgModule, APP_INITIALIZER } from '@angular/core'; -import { BrowserModule, Title } from '@angular/platform-browser'; +import { Title } from '@angular/platform-browser'; import { L10nConfig, diff --git a/src/app/pages/probes/probe/probe-page.component.ts b/src/app/pages/probes/probe/probe-page.component.ts index e61b483..b5f568d 100644 --- a/src/app/pages/probes/probe/probe-page.component.ts +++ b/src/app/pages/probes/probe/probe-page.component.ts @@ -19,16 +19,27 @@ export class ProbePageComponent { private breadcrumbService: BreadcrumbService ) { this.route.params.subscribe(params => { - this.isDetail = params['id'] ? true : false; + if (params['id']) { + this.onDetailContainer(params['id']); + } else { + this.onListContainer(); + } }); + } + onListContainer() { this.breadcrumbService.setItems([ { label: 'Probe', routerLink: ['/probe/list'], } ]); + this.isDetail = false; } - test() { - alert('test'); + onDetailContainer(probeId: string) { + this.breadcrumbService.setItems([ + { label: 'Probe', routerLink: ['/probe/list'] }, + { label: probeId } + ]); + this.isDetail = true; } onProbeSelect(probe: Probe) { diff --git a/tsconfig.json b/tsconfig.json index f6106ad..e2ff9fd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,6 +19,17 @@ "lib": [ "es2017", "dom" - ] + ], + // /* Additional Checks */ + // "noUnusedLocals": true /* Report errors on unused locals. */, + // "noUnusedParameters": true /* Report errors on unused parameters. */, + // "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, + // "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, + + // /* Debugging Options */ + // "traceResolution": false /* Report module resolution log messages. */, + // "listEmittedFiles": false /* Print names of generated files part of the compilation. */, + // "listFiles": false /* Print names of files part of the compilation. */, + // "pretty": true /* Stylize errors and messages using color and context. */, } }