Skip to content

Commit 13ad80c

Browse files
ADjenkovsis0k0
authored andcommitted
refactor: Stop using private APIs to retrieve activated route roiteConfig property
1 parent 8b524a8 commit 13ad80c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

nativescript-angular/router/page-router-outlet.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,13 +359,11 @@ export class PageRouterOutlet implements OnDestroy, OnInit { // tslint:disable-l
359359
log("Activated route marked as page: " + routeToString(nodeToMark));
360360
}
361361

362-
// NOTE: Using private APIs - potential break point!
363362
private getComponentFactory(
364-
activatedRoute: any,
363+
activatedRoute: ActivatedRoute,
365364
loadedResolver: ComponentFactoryResolver
366365
): ComponentFactory<any> {
367-
const snapshot = activatedRoute._futureSnapshot;
368-
const component = <any>snapshot._routeConfig.component;
366+
const { component } = activatedRoute.routeConfig;
369367

370368
return loadedResolver ?
371369
loadedResolver.resolveComponentFactory(component) :

0 commit comments

Comments
 (0)