useClass vs useExisting
useExisting – create refrence to service example here useClass – create new instance of service example here
useExisting – create refrence to service example here useClass – create new instance of service example here
I had also a simmilar issue what solved the issue for me was to use Observable methods and operators to do everything. Then in the end just use the toPromise method of the Observable to return a Promise. This is also simpler because you don’t need to create a promise yourself. The AppConfig service will … Read more
I think this is because you need to return the function in your export function statement: export function apiConfigProvider(config: ApiConfig) { return () => config.loadConfig(); }