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:
@@ -10,14 +10,11 @@ import {
|
||||
NgValidator,
|
||||
forwardRef,
|
||||
Binding
|
||||
} from 'angular2/angular2';
|
||||
} from 'angular2/bootstrap';
|
||||
import {formDirectives, NgControl, Validators, NgForm} from 'angular2/forms';
|
||||
|
||||
import {RegExpWrapper, print, isPresent, CONST_EXPR} from 'angular2/src/facade/lang';
|
||||
|
||||
import {reflector} from 'angular2/src/reflection/reflection';
|
||||
import {ReflectionCapabilities} from 'angular2/src/reflection/reflection_capabilities';
|
||||
|
||||
/**
|
||||
* A domain model we are binding the form controls to.
|
||||
*/
|
||||
@@ -168,6 +165,5 @@ class TemplateDrivenForms {
|
||||
}
|
||||
|
||||
export function main() {
|
||||
reflector.reflectionCapabilities = new ReflectionCapabilities();
|
||||
bootstrap(TemplateDrivenForms);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user