ERROR in Error encountered resolving symbol values statically

后端 未结 1 684
感动是毒
感动是毒 2021-01-22 13:14

I just migrated my project under angular-cli and I\'m getting this error when I start it:

ERROR in Error encountered resolving symbol values statically.

相关标签:
1条回答
  • 2021-01-22 13:55

    You need to extract function like:

    export function configFactory(config: ConfigService) {
      return () => config.load()
    }
    
    ...
    providers: [{ 
      provide: APP_INITIALIZER, 
      useFactory: configFactory, 
      deps: [ConfigService], 
      multi: true 
    }
    

    See also

    • https://github.com/angular/angular/issues/11262

    • Angular4 APP_INITIALIZER won't delay initialization

    0 讨论(0)
提交回复
热议问题