Msg: Unhandled Promise rejection: Cannot read properties of undefined (reading 'data') - Angular

This confuses me. This service has an “providedIn” feature, so no need to do anything in App.module.ts

In fact, I have never seen dependency injection as necessity in app.module. So I wouldn’t do this in AppModule.

 constructor(
    protected userParamsService: UserParametersService,
    protected syncServices: SyncMasterService,
    public networkAutoSyncService: NetworkAutoSyncService
  ) {
  }

Anyway, this may not solve our problem. But could be a solution nevertheless.

1 Like