I have added this code into my app.module.ts
providers: [ AppConfigService,
{
provide: APP_INITIALIZER,
useFactory: (config: AppConfigService) => () => config.getAppConfig(),
deps: [AppConfigService],
multi: true
},
]
Getting this error
Issue: i have used ngx-permission pkg for permission. i set route permission method. but when i refresh a page that time redirect on home page instead stay on current page. so i tried to load permissions before application start up method for resolve this issue but got this error.
config.getAppConfig() // call when application start up
have any idea please help. other solution also welcome.