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); ```
27 lines
695 B
TypeScript
27 lines
695 B
TypeScript
import {
|
|
ChangeDetectorRef,
|
|
} from 'angular2/src/core/change_detection/change_detection';
|
|
|
|
import {ElementRef} from 'angular2/src/core/linker/element_ref';
|
|
import {DomAdapter} from 'angular2/src/platform/dom/dom_adapter';
|
|
|
|
import {SpyObject, proxy} from 'angular2/testing_internal';
|
|
|
|
export class SpyChangeDetectorRef extends SpyObject {
|
|
constructor() {
|
|
super(ChangeDetectorRef);
|
|
this.spy('detectChanges');
|
|
this.spy('checkNoChanges');
|
|
}
|
|
}
|
|
|
|
export class SpyIterableDifferFactory extends SpyObject {}
|
|
|
|
export class SpyElementRef extends SpyObject {
|
|
constructor() { super(ElementRef); }
|
|
}
|
|
|
|
export class SpyDomAdapter extends SpyObject {
|
|
constructor() { super(DomAdapter); }
|
|
}
|