feat(bootstrap): add platform and app initializers
Often some init logic needs to run when a platform or an application is boostrapped. For example, boostraping a platform requires initializing the dom adapter. Now, it can be done as follows: new Provider(PLATFORM_INITIALIZER, {useValue: initDomAdapter, multi: true}), All platform initializers will be run after the platform injector has been created. Similarly, all application initializers will be run after the app injector has been created. Closes #5355
This commit is contained in:
@ -27,6 +27,7 @@ import {SymbolsDiff} from './symbol_inspector/symbol_differ';
|
||||
|
||||
var NG_ALL = [
|
||||
'APP_COMPONENT',
|
||||
'APP_INITIALIZER',
|
||||
'APP_ID',
|
||||
'AbstractProviderError',
|
||||
'AbstractProviderError.addKey()',
|
||||
@ -1396,6 +1397,7 @@ var NG_ALL = [
|
||||
'resolveForwardRef():js',
|
||||
'wtfCreateScope():js',
|
||||
'PLATFORM_COMMON_PROVIDERS',
|
||||
'PLATFORM_INITIALIZER',
|
||||
'wtfCreateScope:dart',
|
||||
'wtfEndTimeRange():js',
|
||||
'wtfEndTimeRange:dart',
|
||||
|
Reference in New Issue
Block a user