mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 10:34:15 +00:00
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:
@@ -36,6 +36,10 @@ interface AppConfig extends Config {
|
||||
mediaViewer: MediaViewerConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection token for the app configuration.
|
||||
* Provided in {@link InitService.providers}.
|
||||
*/
|
||||
const APP_CONFIG = new InjectionToken<AppConfig>('APP_CONFIG');
|
||||
|
||||
const APP_CONFIG_STATE = makeStateKey('APP_CONFIG_STATE');
|
||||
|
Reference in New Issue
Block a user