feat(bootstrap): remove the need for explicit reflection setup in bootstrap code
BREAKING CHANGES: Dart applications and TypeScript applications meant to transpile to Dart must now import `package:angular2/bootstrap.dart` instead of `package:angular2/angular2.dart` in their bootstrap code. `package:angular2/angular2.dart` no longer export the bootstrap function. The transformer rewrites imports of `bootstrap.dart` and calls to `bootstrap` to `bootstrap_static.dart` and `bootstrapStatic` respectively.
This commit is contained in:
@ -1,8 +1,7 @@
|
||||
import {MapWrapper} from 'angular2/src/facade/collection';
|
||||
|
||||
import {bootstrap} from 'angular2/angular2';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {reflector} from 'angular2/src/reflection/reflection';
|
||||
import {ReflectionCapabilities} from 'angular2/src/reflection/reflection_capabilities';
|
||||
|
||||
import {App} from './app';
|
||||
|
||||
@ -10,8 +9,8 @@ import {APP_VIEW_POOL_CAPACITY} from 'angular2/src/core/compiler/view_pool';
|
||||
import {bind} from 'angular2/di';
|
||||
|
||||
export function main() {
|
||||
setupReflector();
|
||||
bootstrap(App, createBindings());
|
||||
setupReflector();
|
||||
}
|
||||
|
||||
function createBindings(): List {
|
||||
@ -19,8 +18,6 @@ function createBindings(): List {
|
||||
}
|
||||
|
||||
export function setupReflector() {
|
||||
reflector.reflectionCapabilities = new ReflectionCapabilities();
|
||||
|
||||
// TODO(kegluneq): Generate this.
|
||||
reflector.registerSetters({
|
||||
'style': (o, m) => {
|
||||
|
Reference in New Issue
Block a user