fix(dynamic_component_loader): Fix for ts2dart issue
Fix a build break by declaring a type for `locals`. See https://github.com/angular/ts2dart/wiki/Builtin-fa%C3%A7ade-methods#fixing-untyped-property-access-errors for some context.
This commit is contained in:
parent
e0fbd4b624
commit
bbfb4e1dcc
|
@ -18,6 +18,7 @@ import {
|
|||
import {TestBed, ViewProxy} from 'angular2/src/test_lib/test_bed';
|
||||
import {Injector} from 'angular2/di';
|
||||
import {Component, View, onDestroy} from 'angular2/annotations';
|
||||
import {Locals} from 'angular2/change_detection';
|
||||
import * as viewAnn from 'angular2/src/core/annotations_impl/view';
|
||||
import {DynamicComponentLoader} from 'angular2/src/core/compiler/dynamic_component_loader';
|
||||
import {ElementRef} from 'angular2/src/core/compiler/element_ref';
|
||||
|
@ -76,7 +77,7 @@ export function main() {
|
|||
}));
|
||||
|
||||
tb.createView(MyComp).then((view) => {
|
||||
var dynamicComponent = view.rawView.locals.get("dynamic");
|
||||
var dynamicComponent = (<Locals>view.rawView.locals).get("dynamic");
|
||||
dynamicComponent.done.then((ref) => {
|
||||
view.detectChanges();
|
||||
expect(view.rootNodes).toHaveText("hello");
|
||||
|
|
Loading…
Reference in New Issue