-aot
オプション(ng build -aot
)でアプリを構築しようとしています。私はこれが呼び出す必要がデコレータで関数呼び出しがサポートされていません
ERROR in Error during template compile of 'MyComponent'
Function calls are not supported in decorators but 'classLogger' was called in 'cLog'
'cLog' calls 'classLogger'.
と私は私はそれを動作させるために、コードを変更することが出来るのですかアイデアを持っていない:私は次のエラーを持っています。
export function classLogger(_classOptions?) {
const myLogger = new MyLogger();
myLogger.options = Object.assign({}, defaultClassOptions, _classOptions);
return myLogger.loggerCB;
}
// export function clog(options = defaultClassOptions): Function {
export function cLog(options?): Function {
return loggingEnabled ? classLogger(options) : emptyClassDecorator();
}
P.S.クラスデコレータはデコレータパッチコールバックに転送する必要のあるオプションを取ります。
は角/ CLI 1.6.8は、問題を解決し、@ ... – zhekaus