儿童路由无法在angular4中进行浏览器刷新。请有人帮助我。
Main Routing :
{
path: 'todo',
loadChildren: 'app/todo/todo.module#TodoModule',
canActivate: [AuthGuard],
data: {
required_scope: "todo"
}
}
}
儿童路由:
import { Routes, RouterModule } from "@angular/router";
import { ModuleWithProviders } from "@angular/core";
import { TodoComponent } from "./todo.component";
import { TodoDetailsComponent } from "./todo-details/todo-details.component";
const routes: Routes = [
{
path: '',
component: TodoComponent,
children: [{
path: ':id',
component: TodoDetailsComponent
}]
}
];
export const TodoRouting: ModuleWithProviders = RouterModule.forChild(routes);