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:
Jeff Cross
2015-09-03 22:01:36 -07:00
parent 6d13cf9b8f
commit f14b212dc9
286 changed files with 739 additions and 690 deletions

View File

@ -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,

View File

@ -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';

View File

@ -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 {

View File

@ -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 {

View File

@ -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';