version: ``` "@angular/cli": "1.6.5", "@angular/*i": "^5.2.0" ``` ng build --prod model error: ERROR in Error during template compile of 'AppModule' Function calls are not supported in decorators but 'AuthModule' was called. ```ts AuthModule.forRoot({ login_url: `/passport/login`, ignores:[ "passport/login", "assets/.*", "test.*" ] }) ``` AuthModule: ``` ts @NgModule({ declarations: [ ], imports: [ ], providers: [ ], exports: [ ] }) export class AuthModule { public static forRoot(options?:any): ModuleWithProviders { if (options && options.ignores && options.ignores.length) { /**字符串数组,如果直接写正则会导致angular项目失败,应该是bug */ options.ignores.map(str => new RegExp(str)); } return { ngModule: AuthModule, providers: [ { provide: DA_USER_OPTIONS_TOKEN, useValue: options }, { provide: DA_OPTIONS_TOKEN, useFactory: optionsFactory, deps: [DA_USER_OPTIONS_TOKEN] }, { provide: DA_STORE_TOKEN, useClass: LocalStorageStore }, { provide: DA_SERVICE_TOKEN, useClass: TokenService } ] }; } } ```