Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?

后端 未结 4 1169
迷失自我
迷失自我 2020-12-25 10:42

I am using Angular 7 and facing an issue => after login the API GET calls successfully and the component receiving data too, but UI is not displaying that data.

Whe

4条回答
  •  执念已碎
    2020-12-25 11:25

    This happens if you try injecting a custom made service:

    constructor(private myService: MyService) {
    }
    

    while you forgot to provide it in the module configuration:

    @NgModule({
      providers: [
        MyService
      ]
    

提交回复
热议问题