Angular 2 AOT功能错误

时间:2016-12-13 17:25:05

标签: angular ecmascript-6 ionic2 angular2-aot

当我尝试将我的Ionic 2应用程序部署到我的Android设备时,我收到以下错误:

  

错误:静态解析符号值时出错。功能   不支持电话。考虑               使用对导出函数的引用替换函数或lambda,解析符号缩减器               /Users/ibnclaudius/Development/egglr/egglr-mobile/.tmp/reducers/index.ts,   解决符号AppModule in               /Users/ibnclaudius/Development/egglr/egglr-mobile/.tmp/app/app.module.ts,   解决符号AppModule in               /Users/ibnclaudius/Development/egglr/egglr-mobile/.tmp/app/app.module.ts

index.ts(给出错误的代码部分)

import { compose } from '@ngrx/core/compose';

export const reducers = compose(storeLogger(), combineReducers)({
  events: fromEvents.eventsReducer,
  subscriptions: fromSubscriptions.subscriptionsReducer
});

1 个答案:

答案 0 :(得分:0)

试试这个

import { compose } from '@ngrx/core/compose';

export interface IReducerDef {
    put: string;
    definition: string;
    here: string;
    // or use whatever definition is result of the compose function
}

export function composeFunction(): IReducerDef {
    return new compose(storeLogger(), combineReducers)({
        events: fromEvents.eventsReducer,
        subscriptions: fromSubscriptions.subscriptionsReducer
    });
}

export const reducers: IReducerDef = composeFunction();