Skip to content

Commit bbfb4e1

Browse files
author
Tim Blasi
committed
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.
1 parent e0fbd4b commit bbfb4e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/angular2/test/core/compiler/dynamic_component_loader_spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
import {TestBed, ViewProxy} from 'angular2/src/test_lib/test_bed';
1919
import {Injector} from 'angular2/di';
2020
import {Component, View, onDestroy} from 'angular2/annotations';
21+
import {Locals} from 'angular2/change_detection';
2122
import * as viewAnn from 'angular2/src/core/annotations_impl/view';
2223
import {DynamicComponentLoader} from 'angular2/src/core/compiler/dynamic_component_loader';
2324
import {ElementRef} from 'angular2/src/core/compiler/element_ref';
@@ -76,7 +77,7 @@ export function main() {
7677
}));
7778

7879
tb.createView(MyComp).then((view) => {
79-
var dynamicComponent = view.rawView.locals.get("dynamic");
80+
var dynamicComponent = (<Locals>view.rawView.locals).get("dynamic");
8081
dynamicComponent.done.then((ref) => {
8182
view.detectChanges();
8283
expect(view.rootNodes).toHaveText("hello");

0 commit comments

Comments
 (0)