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:
@ -19,8 +19,11 @@ main() {
|
||||
it("should be able to load in a Dart VM", () {
|
||||
reflector.reflectionCapabilities = new ReflectionCapabilities();
|
||||
var buses = createPairedMessageBuses();
|
||||
platform([WORKER_APP_PLATFORM])
|
||||
.application([WORKER_APP_APPLICATION_COMMON]);
|
||||
disposePlatform();
|
||||
var platform = createPlatform(ReflectiveInjector.resolveAndCreate(WORKER_APP_PLATFORM));
|
||||
var appInjector = ReflectiveInjector.resolveAndCreate(WORKER_APP_APPLICATION_COMMON,
|
||||
platform.injector);
|
||||
appInjector.get(ApplicationRef);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user