refactor: export core APIs from angular2/core
This change moves many APIs to the angular2/core export. This change also automatically adds FORM_BINDINGS in the application root injector. BREAKING CHANGE: Many dependencies that were previously exported from specific APIs are now exported from angular2/core. Affected exports, which should now be included from angular2/core include: angular2/forms angular2/di angular2/directives angular2/change_detection angular2/bootstrap (except for dart users) angular2/render angular2/metadata angular2/debug angular2/pipes Closes #3977
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import {CONST_EXPR} from "angular2/src/core/facade/lang";
|
||||
import {OpaqueToken} from "angular2/di";
|
||||
import {OpaqueToken} from "angular2/src/core/di";
|
||||
import {RenderElementRef, RenderViewRef} from "angular2/src/core/render/api";
|
||||
|
||||
export const ON_WEB_WORKER = CONST_EXPR(new OpaqueToken('WebWorker.onWebWorker'));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../globals.d.ts" />
|
||||
/// <reference path="../../../manual_typings/globals.d.ts" />
|
||||
import {MessageBus} from "angular2/src/web_workers/shared/message_bus";
|
||||
import {print, isPresent, DateWrapper, stringify} from "angular2/src/core/facade/lang";
|
||||
import {
|
||||
@ -10,7 +10,7 @@ import {
|
||||
} from "angular2/src/core/facade/async";
|
||||
import {ListWrapper, StringMapWrapper, MapWrapper} from "angular2/src/core/facade/collection";
|
||||
import {Serializer} from "angular2/src/web_workers/shared/serializer";
|
||||
import {Injectable} from "angular2/di";
|
||||
import {Injectable} from "angular2/src/core/di";
|
||||
import {Type, StringWrapper} from "angular2/src/core/facade/lang";
|
||||
export {Type} from "angular2/src/core/facade/lang";
|
||||
|
||||
|
@ -5,7 +5,7 @@ import {
|
||||
} from "angular2/src/web_workers/shared/message_bus";
|
||||
import {EventEmitter} from 'angular2/src/core/facade/async';
|
||||
import {StringMap, StringMapWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {Injectable} from "angular2/di";
|
||||
import {Injectable} from "angular2/src/core/di";
|
||||
|
||||
/**
|
||||
* A TypeScript implementation of {@link MessageBus} for communicating via JavaScript's
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Injectable, Inject} from "angular2/di";
|
||||
import {Injectable, Inject} from "angular2/src/core/di";
|
||||
import {RenderProtoViewRef} from "angular2/src/core/render/api";
|
||||
import {ON_WEB_WORKER} from "angular2/src/web_workers/shared/api";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Injectable, Inject} from "angular2/di";
|
||||
import {Injectable, Inject} from "angular2/src/core/di";
|
||||
import {
|
||||
RenderViewRef,
|
||||
RenderFragmentRef,
|
||||
|
@ -33,7 +33,7 @@ import {
|
||||
import {WebWorkerElementRef} from 'angular2/src/web_workers/shared/api';
|
||||
import {AST, ASTWithSource} from 'angular2/src/core/change_detection/change_detection';
|
||||
import {Parser} from "angular2/src/core/change_detection/parser/parser";
|
||||
import {Injectable} from "angular2/di";
|
||||
import {Injectable} from "angular2/src/core/di";
|
||||
import {RenderProtoViewRefStore} from 'angular2/src/web_workers/shared/render_proto_view_ref_store';
|
||||
import {
|
||||
RenderViewWithFragmentsStore
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Injectable} from 'angular2/di';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {ListWrapper, Map, MapWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {Serializer} from "angular2/src/web_workers/shared/serializer";
|
||||
import {isPresent, Type, FunctionWrapper} from "angular2/src/core/facade/lang";
|
||||
|
@ -1,6 +1,7 @@
|
||||
// TODO (jteplitz602): This whole file is nearly identical to core/application.ts.
|
||||
// There should be a way to refactor application so that this file is unnecessary. See #3277
|
||||
import {Injector, bind, Binding} from "angular2/di";
|
||||
import {Injector, bind, Binding} from "angular2/src/core/di";
|
||||
import {DEFAULT_PIPES} from 'angular2/src/core/pipes';
|
||||
import {Reflector, reflector} from 'angular2/src/core/reflection/reflection';
|
||||
import {
|
||||
Parser,
|
||||
@ -10,7 +11,6 @@ import {
|
||||
JitChangeDetection,
|
||||
PreGeneratedChangeDetection
|
||||
} from 'angular2/src/core/change_detection/change_detection';
|
||||
import {DEFAULT_PIPES} from 'angular2/pipes';
|
||||
import {
|
||||
EventManager,
|
||||
DomEventsPlugin,
|
||||
|
@ -8,7 +8,7 @@
|
||||
import {createInjector} from "./di_bindings";
|
||||
import {MessageBus, MessageBusSink} from "angular2/src/web_workers/shared/message_bus";
|
||||
import {createNgZone} from 'angular2/src/core/application_common';
|
||||
import {Injectable} from 'angular2/di';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {BrowserDomAdapter} from 'angular2/src/core/dom/browser_adapter';
|
||||
import {wtfInit} from 'angular2/src/core/profile/wtf_init';
|
||||
import {WebWorkerSetup} from 'angular2/src/web_workers/ui/setup';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Injectable} from 'angular2/di';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
|
||||
import {Serializer, PRIMITIVE} from 'angular2/src/web_workers/shared/serializer';
|
||||
import {
|
||||
|
@ -2,8 +2,8 @@ import {SETUP_CHANNEL} from 'angular2/src/web_workers/shared/messaging_api';
|
||||
import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async';
|
||||
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
|
||||
import {AnchorBasedAppRootUrl} from 'angular2/src/core/services/anchor_based_app_root_url';
|
||||
import {Injectable} from 'angular2/di';
|
||||
import {StringWrapper} from 'angular2/src/core/facade/lang';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
|
||||
@Injectable()
|
||||
export class WebWorkerSetup {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Injectable} from 'angular2/di';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {PRIMITIVE} from 'angular2/src/web_workers/shared/serializer';
|
||||
import {XHR_CHANNEL} from 'angular2/src/web_workers/shared/messaging_api';
|
||||
import {XHR} from 'angular2/src/core/render/xhr';
|
||||
|
@ -4,12 +4,11 @@ import {
|
||||
PostMessageBusSource
|
||||
} from 'angular2/src/web_workers/shared/post_message_bus';
|
||||
import {Type, BaseException} from "angular2/src/core/facade/lang";
|
||||
import {Binding} from "angular2/di";
|
||||
import {Binding, Injectable} from "angular2/src/core/di";
|
||||
import {Map} from 'angular2/src/core/facade/collection';
|
||||
import {Promise} from 'angular2/src/core/facade/async';
|
||||
import {bootstrapWebWorkerCommon} from "angular2/src/web_workers/worker/application_common";
|
||||
import {ApplicationRef} from "angular2/src/core/application_ref";
|
||||
import {Injectable} from "angular2/di";
|
||||
export * from "angular2/src/web_workers/shared/message_bus";
|
||||
|
||||
// TODO(jteplitz602) remove this and compile with lib.webworker.d.ts (#3492)
|
||||
|
@ -1,4 +1,6 @@
|
||||
import {Injector, bind, OpaqueToken, Binding} from 'angular2/di';
|
||||
import {Injector, bind, OpaqueToken, Binding} from 'angular2/src/core/di';
|
||||
import {DEFAULT_PIPES} from 'angular2/src/core/pipes';
|
||||
import {FORM_BINDINGS} from 'angular2/src/core/forms';
|
||||
import {
|
||||
NumberWrapper,
|
||||
Type,
|
||||
@ -23,7 +25,6 @@ import {
|
||||
KeyValueDiffers,
|
||||
defaultKeyValueDiffers
|
||||
} from 'angular2/src/core/change_detection/change_detection';
|
||||
import {DEFAULT_PIPES} from 'angular2/pipes';
|
||||
import {ExceptionHandler} from 'angular2/src/core/exception_handler';
|
||||
import {DirectiveResolver} from 'angular2/src/core/compiler/directive_resolver';
|
||||
import {StyleUrlResolver} from 'angular2/src/core/render/dom/compiler/style_url_resolver';
|
||||
@ -134,7 +135,8 @@ function _injectorBindings(appComponentType, bus: MessageBus, initData: StringMa
|
||||
ComponentUrlMapper,
|
||||
DynamicComponentLoader,
|
||||
bind(AppRootUrl).toValue(new AppRootUrl(initData['rootUrl'])),
|
||||
WebWorkerEventDispatcher
|
||||
WebWorkerEventDispatcher,
|
||||
FORM_BINDINGS
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Injectable} from 'angular2/di';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {Map, MapWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {RenderViewRef, RenderEventDispatcher} from 'angular2/src/core/render/api';
|
||||
import {Serializer} from 'angular2/src/web_workers/shared/serializer';
|
||||
|
@ -20,7 +20,7 @@ import {
|
||||
UiArguments
|
||||
} from "angular2/src/web_workers/shared/client_message_broker";
|
||||
import {isPresent, print, BaseException} from "angular2/src/core/facade/lang";
|
||||
import {Injectable} from "angular2/di";
|
||||
import {Injectable} from "angular2/src/core/di";
|
||||
import {
|
||||
RenderViewWithFragmentsStore,
|
||||
WebWorkerRenderViewRef
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Injectable} from 'angular2/di';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {Promise} from 'angular2/src/core/facade/async';
|
||||
import {XHR} from 'angular2/src/core/render/xhr';
|
||||
import {
|
||||
|
Reference in New Issue
Block a user