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:
@ -1,9 +1,4 @@
|
||||
import {platform, Provider} from 'angular2/core';
|
||||
import {
|
||||
WORKER_RENDER_APPLICATION,
|
||||
WORKER_RENDER_PLATFORM,
|
||||
WORKER_SCRIPT
|
||||
} from 'angular2/platform/worker_render';
|
||||
import {Provider} from 'angular2/core';
|
||||
import {bootstrapRender} from 'angular2/platform/worker_render';
|
||||
|
||||
platform([WORKER_RENDER_PLATFORM])
|
||||
.application([WORKER_RENDER_APPLICATION, new Provider(WORKER_SCRIPT, {useValue: "loader.js"})]);
|
||||
bootstrapRender("loader.js");
|
Reference in New Issue
Block a user