feat: add a PLATFORM_ID token that provides a platform id Object. (#14647)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
"author": "angular",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@angular/common": "0.0.0-PLACEHOLDER",
|
||||
"@angular/core": "0.0.0-PLACEHOLDER",
|
||||
"@angular/compiler": "0.0.0-PLACEHOLDER",
|
||||
"@angular/platform-browser": "0.0.0-PLACEHOLDER",
|
||||
|
||||
@@ -6,17 +6,21 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ɵPLATFORM_WORKER_UI_ID as PLATFORM_WORKER_UI_ID} from '@angular/common';
|
||||
import {ResourceLoader, platformCoreDynamic} from '@angular/compiler';
|
||||
import {COMPILER_OPTIONS, PlatformRef, Provider, createPlatformFactory} from '@angular/core';
|
||||
import {COMPILER_OPTIONS, PLATFORM_ID, PlatformRef, Provider, createPlatformFactory} from '@angular/core';
|
||||
import {ɵResourceLoaderImpl as ResourceLoaderImpl} from '@angular/platform-browser-dynamic';
|
||||
export {VERSION} from './version';
|
||||
|
||||
/**
|
||||
* @experimental API related to bootstrapping are still under review.
|
||||
*/
|
||||
export const platformWorkerAppDynamic = createPlatformFactory(
|
||||
platformCoreDynamic, 'workerAppDynamic', [{
|
||||
provide: COMPILER_OPTIONS,
|
||||
useValue: {providers: [{provide: ResourceLoader, useClass: ResourceLoaderImpl}]},
|
||||
multi: true
|
||||
}]);
|
||||
export const platformWorkerAppDynamic =
|
||||
createPlatformFactory(platformCoreDynamic, 'workerAppDynamic', [
|
||||
{
|
||||
provide: COMPILER_OPTIONS,
|
||||
useValue: {providers: [{provide: ResourceLoader, useClass: ResourceLoaderImpl}]},
|
||||
multi: true
|
||||
},
|
||||
{provide: PLATFORM_ID, useValue: PLATFORM_WORKER_UI_ID}
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user