ERROR in Error encountered resolving symbol values statically. Function calls are not supported. Con
2017-12-07 18:37
796 查看
ERROR in Error encountered resolving symbol values statically. Call function 'provideAuth',
Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function
解决办法:
Define your Authorization module like this:
@NgModule({ providers: [ { provide: AuthHttp, useFactory: authHttpServiceFactory, deps: [Http, RequestOptions] } ] }) export class AuthorizationModule { }
Export authHttpServiceFactory function somewhere in the same file
export function authHttpServiceFactory(http: Http, options: RequestOptions) { return new AuthHttp(new AuthConfig({ tokenName: 'token', tokenGetter: (() => localStorage.getItem('id_token')), globalHeaders: [{'Content-Type':'application/json'}], headerName: 'Authorization', headerPrefix: 'JWT', noJwtError: true }), http, options); }
相关文章推荐
- ERROR in Error encountered resolving symbol values statically. Reference to a non-exported class Log
- Duplicate range boundary values are not allowed in partition function boundary value list.
- Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
- ./stdio.h:477:1: error: 'gets' undeclared here (not in a function)
- 记一次Maven 打包multi-catch statement is not supported in -source 1.5 [ERROR] (use -source 7 or higher to
- Error in normalx(kanx) : could not find function "normalx"
- Single quotes, among other characters that are not supported in PeopleTools Run Control Ids
- 【AngularJs】---"Error: [ng:areq] Argument 'fn' is not a function, got undefined"
- Maven giving error: try-with-resources is not supported in -source 1.5
- Error: [ng:areq] Argument controller Name is not a function, got undefined angular js报错问题解决
- libiconv-1.14 error: ‘gets’ undeclared here (not in a function)
- [置顶] 解决vux 引入组件时Error in render function: "TypeError: _vm.$t is not a function"问题
- error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function _wmain
- error LNK2019:unresolved external symbol *** referenced in function ***的解决方案
- 在ubuntu上编译toolchain时出错./stdio.h:477: error: 'gets' undeclared here (not in a function)
- Compiler Error Message: CS0234: The type or namespace name 'BorderDetails' does not exist in the class or namespace 'Infragistics.WebUI.Shared' (are you missing an assembly reference?)
- 编译安装libiconv报错:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
- [ISSUE]Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed.
- debug : error LNK2019: unresolved external symbol compress referenced in function "public: int __cde
- error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartu