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:
yjbanov
2015-07-22 10:18:04 -07:00
parent 55e8dca8de
commit 3531bb7118
119 changed files with 896 additions and 827 deletions

View File

@ -1,8 +1,13 @@
import {bootstrap, Compiler, Component, Directive, View, ViewContainerRef} from 'angular2/angular2';
import {
bootstrap,
Compiler,
Component,
Directive,
View,
ViewContainerRef
} from 'angular2/bootstrap';
import {LifeCycle} from 'angular2/src/core/life_cycle/life_cycle';
import {reflector} from 'angular2/src/reflection/reflection';
import {ReflectionCapabilities} from 'angular2/src/reflection/reflection_capabilities';
import {DOM} from 'angular2/src/dom/dom_adapter';
import {isPresent} from 'angular2/src/facade/lang';
import {List} from 'angular2/src/facade/collection';
@ -24,10 +29,6 @@ function createBindings(): List<Binding> {
return [bind(APP_VIEW_POOL_CAPACITY).toValue(viewCacheCapacity)];
}
function setupReflector() {
reflector.reflectionCapabilities = new ReflectionCapabilities();
}
var BASELINE_TREE_TEMPLATE;
var BASELINE_IF_TEMPLATE;
@ -35,8 +36,6 @@ export function main() {
BrowserDomAdapter.makeCurrent();
var maxDepth = getIntParameter('depth');
setupReflector();
BASELINE_TREE_TEMPLATE = DOM.createTemplate(
'<span>_<template class="ng-binding"></template><template class="ng-binding"></template></span>');
BASELINE_IF_TEMPLATE = DOM.createTemplate('<span template="if"><tree></tree></span>');