如果我返回到相同的路由路径,则会显示错误
"Uncaught(承诺):TypeError:无法读取未定义的属性'isActivated'".
但不是第一次出现.谁能帮我 ?
const mainRoutes: Routes = [
{ path: '', pathMatch: 'full', redirectTo: '/home' },
{
path: 'home', loadChildren: './apps/home/home.module#HomeModule', canActivate: [AuthGuard],
resolve: {
crisis: NavigarionResolve
}
}
{ path: '**', component: PageNotFoundComponent }
];
Run Code Online (Sandbox Code Playgroud)
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { AuthService } from '../main/service/auth.service';
@Component({
selector: 'home-app',
templateUrl: 'apps/home/view/home.component.html',
providers: [AuthService]
})
export class HomeComponent implements OnInit {
loaded: boolean = false;
title = 'Customer Management …Run Code Online (Sandbox Code Playgroud)