提出并发布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);
这个问题有解决方法吗?