router-outlet

Condition based router-outlet not changing its content on url change in app.component.html in angular

懵懂的女人 提交于 2021-02-05 10:46:11
问题 In app.component.html , there is condition based template.. My problem is condition in ngif matches(but url changes) , then router-outlet do not change its content but if condition do not matches then content changes. Below is my code app.component.html <app-web-header></app-web-header> <div *ngIf="isAdminComponent"> <app-home ></app-home> </div> <div *ngIf="!isAdminComponent"> <app-user-home></app-user-home> </div> <app-web-footer></app-web-footer> app.component.ts import { Component, Inject

Angular 5 Cannot match any routes on named outlet of lazy loaded module [duplicate]

十年热恋 提交于 2020-05-12 16:46:52
问题 This question already has answers here : Angular 4 Lazy loading with named router-outlet not working (3 answers) Closed 2 years ago . My Route of the Root Module is like this: RouterModule.forRoot([ { path: '', redirectTo: 'management-portal', pathMatch: 'full' }, { path: 'management-portal', loadChildren: './xxx/management-portal.module#ManagementPortalModule', canActivate: [AuthGuard] }, { path: 'login', component: LoginComponent }, { path: '**', component: NotFoundComponent } ], {

Angular 5 Cannot match any routes on named outlet of lazy loaded module [duplicate]

我怕爱的太早我们不能终老 提交于 2020-05-12 16:45:03
问题 This question already has answers here : Angular 4 Lazy loading with named router-outlet not working (3 answers) Closed 2 years ago . My Route of the Root Module is like this: RouterModule.forRoot([ { path: '', redirectTo: 'management-portal', pathMatch: 'full' }, { path: 'management-portal', loadChildren: './xxx/management-portal.module#ManagementPortalModule', canActivate: [AuthGuard] }, { path: 'login', component: LoginComponent }, { path: '**', component: NotFoundComponent } ], {

Angular 5 Cannot match any routes on named outlet of lazy loaded module [duplicate]

安稳与你 提交于 2020-05-12 16:41:14
问题 This question already has answers here : Angular 4 Lazy loading with named router-outlet not working (3 answers) Closed 2 years ago . My Route of the Root Module is like this: RouterModule.forRoot([ { path: '', redirectTo: 'management-portal', pathMatch: 'full' }, { path: 'management-portal', loadChildren: './xxx/management-portal.module#ManagementPortalModule', canActivate: [AuthGuard] }, { path: 'login', component: LoginComponent }, { path: '**', component: NotFoundComponent } ], {

Ionic v4 menu only works when router-outlet has the main attribute

送分小仙女□ 提交于 2020-01-24 13:11:40
问题 I'm building an app with ionic v4 the first time and I want to include a side menu. For testing reasons, I first put it inside of the app.component.html but I couldn't let it swipe out or in. So I saw in the documentation, that they added the main attribute on the ion-router-outlet but as far as I read: it is not documented anywhere. I don't know, why I'd have to add this, to make it actually work. Source: https://ionicframework.com/docs/api/menu <ion-router-outlet main></ion-router-outlet>