子项路由无法在angular4中进行浏览器刷新

时间:2017-04-14 05:11:13

标签: angular2-routing

儿童路由无法在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);

0 个答案:

没有答案