refactor(core): support non reflective bootstrap.

This changes Angular so that it can be used without reflection (assuming a codegen for injectors).

BREAKIKNG CHANGE:
- Drops `APP_COMPONENT` provider. Instead, inject
  `ApplicationRef` and read its `componentTypes` property.
- long form bootstrap has changed into the following:
  ```
  var platform = createPlatform(ReflectiveInjector.resolveAndCreate(BROWSER_PROVIDERS));
  var appInjector =
    ReflectiveInjector.resolveAndCreate([BROWSER_APP_PROVIDERS, appProviders], platform.injector);
  coreLoadAndBootstrap(appInjector, MyApp);
  ```
This commit is contained in:
Tobias Bosch
2016-04-14 14:52:35 -07:00
parent 0a7d10ba55
commit 9092ac79d4
73 changed files with 784 additions and 649 deletions

View File

@ -10,7 +10,7 @@ class ChildCmp {
@Component({
template: `
<h2>Parent</h2> (<router-outlet></router-outlet>)
<h2>Parent</h2> (<router-outlet></router-outlet>)
<p>{{log}}</p>`,
directives: [ROUTER_DIRECTIVES]
})
@ -34,7 +34,7 @@ class ParentCmp implements OnActivate {
selector: 'example-app',
template: `
<h1>My app</h1>
<nav>
<a [routerLink]="['Parent', 'Child']">Child</a>
</nav>