diff options
author | crupest <crupest@outlook.com> | 2019-03-11 21:01:28 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-03-11 21:01:28 +0800 |
commit | 6e8434fa885bdb7ef9fd0f09a8cd29c0e17cef5b (patch) | |
tree | ee57954f1bbe2c1b944d648b2887fc63a865a289 /Timeline/ClientApp/src/app/user/user-dialog/user-dialog.component.ts | |
parent | 6f02dc7094d1304501e7ffd6c39ecf89369202c7 (diff) | |
download | timeline-6e8434fa885bdb7ef9fd0f09a8cd29c0e17cef5b.tar.gz timeline-6e8434fa885bdb7ef9fd0f09a8cd29c0e17cef5b.tar.bz2 timeline-6e8434fa885bdb7ef9fd0f09a8cd29c0e17cef5b.zip |
Use strict check of typescript compiler.
Diffstat (limited to 'Timeline/ClientApp/src/app/user/user-dialog/user-dialog.component.ts')
-rw-r--r-- | Timeline/ClientApp/src/app/user/user-dialog/user-dialog.component.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Timeline/ClientApp/src/app/user/user-dialog/user-dialog.component.ts b/Timeline/ClientApp/src/app/user/user-dialog/user-dialog.component.ts index 498ffaa1..cf5f3643 100644 --- a/Timeline/ClientApp/src/app/user/user-dialog/user-dialog.component.ts +++ b/Timeline/ClientApp/src/app/user/user-dialog/user-dialog.component.ts @@ -11,15 +11,16 @@ export class UserDialogComponent implements OnInit, OnDestroy { constructor(private userService: InternalUserService, private router: Router) { } - @ViewChild(RouterOutlet) outlet: RouterOutlet; + @ViewChild(RouterOutlet) outlet!: RouterOutlet; isLoading = true; ngOnInit() { // this is a workaround for a bug. see https://github.com/angular/angular/issues/20694 - this.router.events.subscribe(e => { + const subscription = this.router.events.subscribe(e => { if (e instanceof ActivationStart && e.snapshot.outlet === 'user') { this.outlet.deactivate(); + subscription.unsubscribe(); } }); |