我一直在研究和搜索关于这个问题的日子,但是虽然已经在网上公布了各种变体,但仍无法找到解决方案 .
当我尝试在 生产环境 模式下使用Angular CLI编译我的应用程序时,出现以下错误:
静态解析符号值时遇到错误 . 调用函数'FluffySpoonAuthenticationModule',不支持函数调用 . 考虑使用对导出函数的引用替换函数或lambda,解析app.module.ts中的符号AppModule,解析app.module.ts中的符号AppModule
这是 app.module.ts
的相关部分 .
import { FluffySpoonAuthenticationModule } from '@fluffy-spoon/angular.authentication.jwt';
@NgModule({
imports: [
FluffySpoonAuthenticationModule.forRoot('foo')
]
})
export class AppModule {}
现在,显然在导入部分,我正在调用一个方法 . 但由于我需要指定一个动态字符串值作为模块的一部分,我需要能够以某种方式调用一个方法来配置该部分 . 此外,为什么它会与其他 forRoot
电话合作而不是我的,对吧?
FluffySpoonAuthenticationModule的源代码如下:https://github.com/ffMathy/FluffySpoon.Angular.Authentication.Jwt/
我正在使用命令 ionic cordova build android --prod