From 4a5ea4675c5cb576add6ea0afc96c4b11e395d88 Mon Sep 17 00:00:00 2001 From: Eduardo Speroni Date: Thu, 23 Jun 2022 14:11:29 -0300 Subject: [PATCH] fix: handle standalone component routing with loadComponent (#73) --- packages/angular/src/lib/legacy/router/page-router-outlet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/src/lib/legacy/router/page-router-outlet.ts b/packages/angular/src/lib/legacy/router/page-router-outlet.ts index d3b02c5..ce4ddc5 100644 --- a/packages/angular/src/lib/legacy/router/page-router-outlet.ts +++ b/packages/angular/src/lib/legacy/router/page-router-outlet.ts @@ -480,7 +480,7 @@ export class PageRouterOutlet implements OnDestroy, RouterOutletContract { } private getComponentFactory(activatedRoute: ActivatedRoute, loadedResolver: ComponentFactoryResolver): ComponentFactory { - const { component } = activatedRoute.routeConfig; + const component = activatedRoute.routeConfig.component || activatedRoute.component; return loadedResolver ? loadedResolver.resolveComponentFactory(component) : this.componentFactoryResolver.resolveComponentFactory(component); }