fix(WebWorker): remove the platform-browser dependency on compiler
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
import {isPresent, isBlank} from './facade/lang';
|
||||
import {WORKER_APP_PLATFORM, WORKER_APP_PLATFORM_MARKER} from './webworker/worker_app_common';
|
||||
import {WORKER_APP_APPLICATION} from './webworker/worker_app';
|
||||
import {
|
||||
WORKER_APP_PLATFORM_PROVIDERS,
|
||||
WORKER_APP_PLATFORM_MARKER
|
||||
} from './webworker/worker_app_common';
|
||||
import {WORKER_APP_APPLICATION_PROVIDERS} from './webworker/worker_app';
|
||||
import {
|
||||
PlatformRef,
|
||||
Type,
|
||||
@ -12,8 +15,11 @@ import {
|
||||
assertPlatform
|
||||
} from '@angular/core';
|
||||
|
||||
export {WORKER_APP_PLATFORM, WORKER_APP_APPLICATION_COMMON} from './webworker/worker_app_common';
|
||||
export {WORKER_APP_APPLICATION} from './webworker/worker_app';
|
||||
export {
|
||||
WORKER_APP_PLATFORM_PROVIDERS,
|
||||
WORKER_APP_APPLICATION_COMMON_PROVIDERS
|
||||
} from './webworker/worker_app_common';
|
||||
export {WORKER_APP_APPLICATION_PROVIDERS} from './webworker/worker_app';
|
||||
export {
|
||||
ClientMessageBroker,
|
||||
ClientMessageBrokerFactory,
|
||||
@ -27,20 +33,20 @@ export {
|
||||
} from './web_workers/shared/service_message_broker';
|
||||
export {PRIMITIVE} from './web_workers/shared/serializer';
|
||||
export * from './web_workers/shared/message_bus';
|
||||
export {WORKER_APP_ROUTER} from './web_workers/worker/router_providers';
|
||||
export {WORKER_APP_LOCATION_PROVIDERS} from './web_workers/worker/location_providers';
|
||||
|
||||
export function workerAppPlatform(): PlatformRef {
|
||||
if (isBlank(getPlatform())) {
|
||||
createPlatform(ReflectiveInjector.resolveAndCreate(WORKER_APP_PLATFORM));
|
||||
createPlatform(ReflectiveInjector.resolveAndCreate(WORKER_APP_PLATFORM_PROVIDERS));
|
||||
}
|
||||
return assertPlatform(WORKER_APP_PLATFORM_MARKER);
|
||||
}
|
||||
|
||||
export function bootstrapApp(
|
||||
export function bootstrapStaticApp(
|
||||
appComponentType: Type,
|
||||
customProviders?: Array<any /*Type | Provider | any[]*/>): Promise<ComponentRef<any>> {
|
||||
var appInjector = ReflectiveInjector.resolveAndCreate(
|
||||
[WORKER_APP_APPLICATION, isPresent(customProviders) ? customProviders : []],
|
||||
[WORKER_APP_APPLICATION_PROVIDERS, isPresent(customProviders) ? customProviders : []],
|
||||
workerAppPlatform().injector);
|
||||
return coreLoadAndBootstrap(appInjector, appComponentType);
|
||||
}
|
||||
|
Reference in New Issue
Block a user