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:
Tim Blasi 2015-06-12 16:55:08 -07:00
parent e0fbd4b624
commit bbfb4e1dcc
1 changed files with 2 additions and 1 deletions

View File

@ -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");