fix(WebWorker): remove the platform-browser dependency on compiler

This commit is contained in:
Victor Berchet
2016-05-13 13:22:29 -07:00
parent a01a54c180
commit 6e62217b78
92 changed files with 1331 additions and 496 deletions

View File

@ -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);
}