我爲XSRFStrategy
在app.module.tsCookieXSRFStrategy不是在AOT模式@angular
providers: [
{ provide: APP_BASE_HREF, useValue: '/order/' },
{ provide: XSRFStrategy, useValue: new CookieXSRFStrategy('csrftoken', 'X-CSRFToken') },
{ provide: RequestOptions, useClass: DefaultRequestOptions }
],
做工精細用手錶提供CookieXSRFStrategy
工作/服務於第二內建但--prod標誌建築時,收到此錯誤:
ERROR in Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function (position 50:34 in the original .ts file), resolving symbol AppModule in E:/repo/src/app/app.module.ts
納克--version
@angular/cli: 1.0.0
node: 6.9.1
os: win32 x64
@angular/common: 4.0.0
@angular/compiler: 4.0.0
@angular/core: 4.0.0
@angular/forms: 4.0.0
@angular/http: 4.0.0
@angular/platform-browser: 4.0.0
@angular/platform-browser-dynamic: 4.0.0
@angular/router: 4.0.0
@angular/animations: 4.0.0
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.0
這是黃金。你也應該接受答案。 –