diff --git a/packages/router/src/directives/router_link.ts b/packages/router/src/directives/router_link.ts index 7b041980f3..58be39a05a 100644 --- a/packages/router/src/directives/router_link.ts +++ b/packages/router/src/directives/router_link.ts @@ -202,6 +202,7 @@ export class RouterLink { this.preserve = value; } + /** @nodoc */ @HostListener('click') onClick(): boolean { const extras = { @@ -334,13 +335,16 @@ export class RouterLinkWithHref implements OnChanges, OnDestroy { this.preserve = value; } + /** @nodoc */ ngOnChanges(changes: {}): any { this.updateTargetUrlAndHref(); } + /** @nodoc */ ngOnDestroy(): any { this.subscription.unsubscribe(); } + /** @nodoc */ @HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey']) onClick(button: number, ctrlKey: boolean, metaKey: boolean, shiftKey: boolean): boolean { if (button !== 0 || ctrlKey || metaKey || shiftKey) { diff --git a/packages/router/src/directives/router_link_active.ts b/packages/router/src/directives/router_link_active.ts index 8c56ca12b4..209546d424 100644 --- a/packages/router/src/directives/router_link_active.ts +++ b/packages/router/src/directives/router_link_active.ts @@ -102,7 +102,7 @@ export class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit }); } - + /** @nodoc */ ngAfterContentInit(): void { this.links.changes.subscribe(_ => this.update()); this.linksWithHrefs.changes.subscribe(_ => this.update()); @@ -115,9 +115,11 @@ export class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit this.classes = classes.filter(c => !!c); } + /** @nodoc */ ngOnChanges(changes: SimpleChanges): void { this.update(); } + /** @nodoc */ ngOnDestroy(): void { this.subscription.unsubscribe(); } diff --git a/packages/router/src/directives/router_outlet.ts b/packages/router/src/directives/router_outlet.ts index 904e5e1f76..6e7425a4f5 100644 --- a/packages/router/src/directives/router_outlet.ts +++ b/packages/router/src/directives/router_outlet.ts @@ -76,10 +76,12 @@ export class RouterOutlet implements OnDestroy, OnInit { parentContexts.onChildOutletCreated(this.name, this); } + /** @nodoc */ ngOnDestroy(): void { this.parentContexts.onChildOutletDestroyed(this.name); } + /** @nodoc */ ngOnInit(): void { if (!this.activated) { // If the outlet was not instantiated at the time the route got activated we need to populate diff --git a/packages/router/src/router.ts b/packages/router/src/router.ts index a4e1dae9fa..5d05c48305 100644 --- a/packages/router/src/router.ts +++ b/packages/router/src/router.ts @@ -1010,7 +1010,7 @@ export class Router { this.lastSuccessfulId = -1; } - /** @docsNotRequired */ + /** @nodoc */ ngOnDestroy(): void { this.dispose(); } diff --git a/packages/router/src/router_preloader.ts b/packages/router/src/router_preloader.ts index 6b6da836bb..2da507f9cf 100644 --- a/packages/router/src/router_preloader.ts +++ b/packages/router/src/router_preloader.ts @@ -97,6 +97,7 @@ export class RouterPreloader implements OnDestroy { return this.processRoutes(ngModule, this.router.config); } + /** @nodoc */ ngOnDestroy(): void { if (this.subscription) { this.subscription.unsubscribe(); diff --git a/packages/router/src/router_scroller.ts b/packages/router/src/router_scroller.ts index 9d0c6e8d58..e1569083b2 100644 --- a/packages/router/src/router_scroller.ts +++ b/packages/router/src/router_scroller.ts @@ -87,6 +87,7 @@ export class RouterScroller implements OnDestroy { routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor)); } + /** @nodoc */ ngOnDestroy() { if (this.routerEventsSubscription) { this.routerEventsSubscription.unsubscribe();