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,4 +1,6 @@
import {Injector, bind, OpaqueToken, Binding} from 'angular2/di';
import {DEFAULT_PIPES} from 'angular2/src/core/pipes';
import {FORM_BINDINGS} from 'angular2/src/core/forms';
import {bind, Binding, Injector, OpaqueToken} from 'angular2/src/core/di';
import {
NumberWrapper,
Type,
@ -25,7 +27,6 @@ import {
KeyValueDiffers,
defaultKeyValueDiffers
} from 'angular2/src/core/change_detection/change_detection';
import {DEFAULT_PIPES} from 'angular2/pipes';
import {ExceptionHandler} from './exception_handler';
import {ViewLoader} from 'angular2/src/core/render/dom/compiler/view_loader';
import {StyleUrlResolver} from 'angular2/src/core/render/dom/compiler/style_url_resolver';
@ -156,7 +157,8 @@ function _injectorBindings(appComponentType): Array<Type | Binding | any[]> {
DynamicComponentLoader,
Testability,
AnchorBasedAppRootUrl,
bind(AppRootUrl).toAlias(AnchorBasedAppRootUrl)
bind(AppRootUrl).toAlias(AnchorBasedAppRootUrl),
FORM_BINDINGS
];
}