Angular AOT 2.3.1 - 与路线子项编译错误

时间:2017-01-03 01:42:39

标签: angular angular2-routing angular-cli angular2-aot

提出并发布angular-cli git https://github.com/angular/angular-cli/issues/3701但被告知要在此发布。

我的角度2.0.0项目工作正常,直到最近升级为角度2.3.1

children添加到路由时会发生以下错误。 ERROR in Error encountered resolving symbol values statically. Calling function 'label', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol ActionTypes in C:/Workspace/xxx/src/app/game-vendor.action.ts, resolving symbol gameVendorRoutes in C:/Workspace/xxx/src/app/game-vendor/game-vendor.routing.ts, resolving symbol gameVendorRouting in C:/Workspace/ xxx/src/app/game-vendor/game-vendor.routing.ts, resolving symbol gameVendorRouting in C:/Workspace/xxx/src/app/game-vendor/game-vendor.routing.ts, resolving symbol GameVendorModule in C:/Workspace/xxx/src/app/game-vendor/game-vendor.module.ts, resolving symbol GameVendorModule in C:/Workspace/xxx/src/app/game-vendor/game-vendor.module.ts

注释代码导致问题。 export const gameVendorRoutes: Routes = [ { path: 'gamevendors', component: InnerPageRegionComponent, children: [ { path: 'get', component: GameVendorGetComponent, data: { title: 'Get Game Vendor', description: 'Get Game Vendor', keywords: ['get', 'game', 'vendor', 'get game vendor'], category: 'Game Vendor', }, }, // { // path: 'create', // component: GameVendorCreateComponent, // data: { // title: 'Create Game Vendor', // description: 'Create Game Vendor', // keywords: ['create', 'game', 'vendor', 'create game vendor'], // category: 'Game Vendor', // recallAction: actions.ActionTypes.UPDATE_STORE, // }, // }, ], }, ]; export const gameVendorRouting: ModuleWithProviders = RouterModule.forChild(gameVendorRoutes);

这个问题有解决方法吗?

0 个答案:

没有答案