Angular 2 Set APP_BASE_HREF with a value from a Promise / Observable
问题 I try to set the APP_BASE_HREF in the "CoreModule" with a value from a async rest call. I can't see how this is done, because the provide method needs to return a string. for example: @NgModule({ imports: [ ... HttpModule ], ... providers: [ ... ... BackendRequestClass, { provide: APP_BASE_HREF, useFactory: () => () => return '/some/path', deps: [], multi: true } ], }); but when I need the value from a webservice, I can't return the string. Any ideas how this could be done? thx 回答1: I tried