93219: Support Router in InitService

For Router to work properly, APP_BASE_HREF must be resolved _before_ the APP_INITIALIZER factory is called (otherwise Angular will attempt to initialize APP_BASE_HREF too soon)
To fix this we add a pre-initialization hook to APP_CONFIG so BrowserInitService can resolve it before APP_INITIALIZER
This commit is contained in:
Yura Bondarenko
2022-07-19 17:58:19 +02:00
parent 39c2aa85ec
commit 372cddfd5e
8 changed files with 164 additions and 64 deletions

View File

@@ -29,7 +29,7 @@ export class ServerInitService extends InitService {
super(store, correlationIdService, dspaceTransferState);
}
public init(): () => Promise<boolean> {
protected init(): () => Promise<boolean> {
return async () => {
this.checkAuthenticationToken();
this.saveAppConfigForCSR();