2016-12-13 3 views
0

При попытке развернуть мое приложение Ионные 2 на мой андроид устройства я получаю следующее сообщение об ошибке:Угловое 2 АОТ ошибка функции

Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol reducers in /Users/ibnclaudius/Development/egglr/egglr-mobile/.tmp/reducers/index.ts, resolving symbol AppModule in /Users/ibnclaudius/Development/egglr/egglr-mobile/.tmp/app/app.module.ts, resolving symbol 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 
}); 

ответ

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();

+0

Ошибка: возникла ошибка при определении значений символов. Вызов функций не поддерживается. Рассмотрите возможность замены функции или лямбда ссылкой на экспортированную функцию, разрешение символа composeFunction –

+0

Просто догадайтесь, попробуйте код сейчас. Я добавил «новый» в «return new compose (storeLogger(), combReducers)» и т. Д. – brando

+0

и откуда вы получаете storeLogger()? – brando