当我尝试在我的角度应用程序中导入PrimeNG-Extensions(https://github.com/sudheerj/primeng-extensions)模块时,抛出以下错误。仅在默认情况下启用AOT的PROD模式下,才能复制此问题。与tsconfig-aot.json
有关吗错误:
primeng-extensions / components / wizard / wizard.js.ts(129,35):错误 'ɵ2'的模板编译期间,函数表达式不 在装饰器中支持 考虑将函数表达式更改为导出的函数。
但是它类似于任何PrimeNG模块
var WizardModule = /** @class */ (function () {
function WizardModule() {
}
tsconfig-aot.json文件配置如下
{
"compilerOptions": {
"outDir": "components",
"rootDir": "src/app/components",
"target": "es5",
"module": "es2015",
"baseUrl": "src",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"lib": ["dom","es6"]
},
"include": [
"src/app/components/**/*"
],
"angularCompilerOptions": {
"genDir": "aot",
"skipMetadataEmit" : false
}
}