X Tutup
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion modules/angular2/angular2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ export 'package:angular2/src/platform/dom/dom_tokens.dart';
export 'package:angular2/src/platform/dom/dom_adapter.dart';
export 'package:angular2/src/platform/dom/events/event_manager.dart';
export 'package:angular2/src/compiler/url_resolver.dart';
export 'package:angular2/src/compiler/app_root_url.dart';
3 changes: 1 addition & 2 deletions modules/angular2/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
*/
export * from './src/compiler/url_resolver';
export * from './src/compiler/xhr';
export * from './src/compiler/compiler';
export * from './src/compiler/app_root_url';
export * from './src/compiler/compiler';
18 changes: 0 additions & 18 deletions modules/angular2/src/compiler/anchor_based_app_root_url.ts

This file was deleted.

16 changes: 0 additions & 16 deletions modules/angular2/src/compiler/app_root_url.ts

This file was deleted.

4 changes: 0 additions & 4 deletions modules/angular2/src/compiler/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import {RuntimeCompiler} from 'angular2/src/compiler/runtime_compiler';
import {ElementSchemaRegistry} from 'angular2/src/compiler/schema/element_schema_registry';
import {DomElementSchemaRegistry} from 'angular2/src/compiler/schema/dom_element_schema_registry';
import {UrlResolver, DEFAULT_PACKAGE_URL_PROVIDER} from 'angular2/src/compiler/url_resolver';
import {AppRootUrl} from 'angular2/src/compiler/app_root_url';
import {AnchorBasedAppRootUrl} from 'angular2/src/compiler/anchor_based_app_root_url';
import {Parser, Lexer} from 'angular2/src/core/change_detection/change_detection';

function _createChangeDetectorGenConfig() {
Expand All @@ -50,7 +48,5 @@ export const COMPILER_PROVIDERS: Array<Type | Provider | any[]> = CONST_EXPR([
new Provider(Compiler, {useExisting: RuntimeCompiler}),
DomElementSchemaRegistry,
new Provider(ElementSchemaRegistry, {useExisting: DomElementSchemaRegistry}),
AnchorBasedAppRootUrl,
new Provider(AppRootUrl, {useExisting: AnchorBasedAppRootUrl}),
UrlResolver
]);
25 changes: 5 additions & 20 deletions modules/angular2/src/platform/worker_app_common.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {XHR} from 'angular2/src/compiler/xhr';
import {WebWorkerXHRImpl} from 'angular2/src/web_workers/worker/xhr_impl';
import {ListWrapper} from 'angular2/src/facade/collection';
import {AppRootUrl} from 'angular2/src/compiler/app_root_url';
import {WebWorkerRenderer} from 'angular2/src/web_workers/worker/renderer';
import {print, Type, CONST_EXPR, isPresent} from 'angular2/src/facade/lang';
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
Expand Down Expand Up @@ -32,9 +31,7 @@ import {
} from 'angular2/src/web_workers/shared/render_view_with_fragments_store';
import {WebWorkerEventDispatcher} from 'angular2/src/web_workers/worker/event_dispatcher';
import {NgZone} from 'angular2/src/core/zone/ng_zone';
import {Promise, PromiseWrapper, PromiseCompleter} from 'angular2/src/facade/async';
import {SETUP_CHANNEL} from 'angular2/src/web_workers/shared/messaging_api';
import {ObservableWrapper} from 'angular2/src/facade/async';
import {Promise, PromiseWrapper} from 'angular2/src/facade/async';

class PrintLogger {
log = print;
Expand Down Expand Up @@ -77,21 +74,9 @@ function _exceptionHandler(): ExceptionHandler {
*/
export function genericWorkerAppProviders(bus: MessageBus,
zone: NgZone): Promise<Array<Type | Provider | any[]>> {
var bootstrapProcess: PromiseCompleter<any> = PromiseWrapper.completer();
bus.attachToZone(zone);
bus.initChannel(SETUP_CHANNEL, false);

var subscription: any;
var emitter = bus.from(SETUP_CHANNEL);
subscription = ObservableWrapper.subscribe(emitter, (initData: {[key: string]: any}) => {
var bindings = ListWrapper.concat(WORKER_APP_COMMON_PROVIDERS, [
new Provider(MessageBus, {useValue: bus}),
new Provider(AppRootUrl, {useValue: new AppRootUrl(initData['rootUrl'])}),
]);
bootstrapProcess.resolve(bindings);
ObservableWrapper.dispose(subscription);
});

ObservableWrapper.callNext(bus.to(SETUP_CHANNEL), "ready");
return bootstrapProcess.promise;
var bindings = ListWrapper.concat(WORKER_APP_COMMON_PROVIDERS, [
new Provider(MessageBus, {useValue: bus}),
]);
return PromiseWrapper.resolve(bindings);
}
1 change: 0 additions & 1 deletion modules/angular2/src/platform/worker_render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
import {APP_INITIALIZER} from 'angular2/core';
import {Injector, Injectable, Provider} from 'angular2/src/core/di';
import {WebWorkerSetup} from 'angular2/src/web_workers/ui/setup';
import {MessageBasedRenderer} from 'angular2/src/web_workers/ui/renderer';
import {MessageBasedXHRImpl} from 'angular2/src/web_workers/ui/xhr_impl';
import {
Expand Down
7 changes: 1 addition & 6 deletions modules/angular2/src/platform/worker_render_common.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import {CONST_EXPR, IS_DART} from 'angular2/src/facade/lang';
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
import {NgZone} from 'angular2/src/core/zone/ng_zone';
import {AnchorBasedAppRootUrl} from 'angular2/src/compiler/anchor_based_app_root_url';
import {AppRootUrl} from 'angular2/src/compiler/app_root_url';
import {
PLATFORM_DIRECTIVES,
PLATFORM_PIPES,
Expand Down Expand Up @@ -36,7 +34,6 @@ import {Testability} from 'angular2/src/core/testability/testability';
import {BrowserGetTestability} from 'angular2/src/platform/browser/testability';
import {BrowserDomAdapter} from './browser/browser_adapter';
import {wtfInit} from 'angular2/src/core/profile/wtf_init';
import {WebWorkerSetup} from 'angular2/src/web_workers/ui/setup';
import {MessageBasedRenderer} from 'angular2/src/web_workers/ui/renderer';
import {MessageBasedXHRImpl} from 'angular2/src/web_workers/ui/xhr_impl';
import {
Expand All @@ -58,7 +55,7 @@ export const WORKER_SCRIPT: OpaqueToken = CONST_EXPR(new OpaqueToken("WebWorkerS

// Message based Worker classes that listen on the MessageBus
export const WORKER_RENDER_MESSAGING_PROVIDERS: Array<any /*Type | Provider | any[]*/> =
CONST_EXPR([MessageBasedRenderer, MessageBasedXHRImpl, WebWorkerSetup]);
CONST_EXPR([MessageBasedRenderer, MessageBasedXHRImpl]);

export const WORKER_RENDER_PLATFORM: Array<any /*Type | Provider | any[]*/> = CONST_EXPR([
PLATFORM_COMMON_PROVIDERS,
Expand All @@ -82,8 +79,6 @@ export const WORKER_RENDER_APP_COMMON: Array<any /*Type | Provider | any[]*/> =
MessageBasedXHRImpl,
new Provider(ServiceMessageBrokerFactory, {useClass: ServiceMessageBrokerFactory_}),
new Provider(ClientMessageBrokerFactory, {useClass: ClientMessageBrokerFactory_}),
AnchorBasedAppRootUrl,
new Provider(AppRootUrl, {useExisting: AnchorBasedAppRootUrl}),
Serializer,
new Provider(ON_WEB_WORKER, {useValue: false}),
RenderViewWithFragmentsStore,
Expand Down
1 change: 0 additions & 1 deletion modules/angular2/src/web_workers/shared/messaging_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* All channels used by angular's WebWorker components are listed here.
* You should not use these channels in your application code.
*/
export const SETUP_CHANNEL = "ng-WebWorkerSetup";
export const RENDERER_CHANNEL = "ng-Renderer";
export const XHR_CHANNEL = "ng-XHR";
export const EVENT_CHANNEL = "ng-events";
27 changes: 0 additions & 27 deletions modules/angular2/src/web_workers/ui/setup.ts

This file was deleted.

3 changes: 0 additions & 3 deletions modules/angular2/test/public_api_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,6 @@ var NG_COMPILER = [
"VariableAst.sourceSpan=",
"VariableAst.value",
"VariableAst.value=",
"AppRootUrl",
"AppRootUrl.value",
"AppRootUrl.value=",
"DEFAULT_PACKAGE_URL_PROVIDER",
"UrlResolver",
"UrlResolver.resolve()",
Expand Down
2 changes: 1 addition & 1 deletion modules/angular2/web_worker/worker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from '../common';
export * from '../core';
export * from '../platform/worker_app';
export {UrlResolver, AppRootUrl} from '../compiler';
export {UrlResolver} from '../compiler';
export * from '../instrumentation';
export * from 'angular2/src/platform/worker_app';
X Tutup