|
2 | 2 | import {
|
3 | 3 | Component, ComponentResolver, ComponentFactory,
|
4 | 4 | ViewContainerRef, ReflectiveInjector
|
5 |
| -} from 'angular2/core'; |
6 |
| -import {provide} from "angular2/core"; |
7 |
| -import {Input} from "angular2/core"; |
8 |
| -import {ComponentRef} from "angular2/core"; |
9 |
| -import {Type} from "angular2/core"; |
| 5 | +} from '@angular/core'; |
| 6 | +import {provide} from "@angular/core"; |
| 7 | +import {Input} from "@angular/core"; |
| 8 | +import {ComponentRef} from "@angular/core"; |
| 9 | +import {Type} from "@angular/core"; |
10 | 10 |
|
11 | 11 | import {UIRouter} from "../router";
|
12 | 12 | import {trace} from "../common/trace";
|
13 |
| -import {Inject} from "angular2/core"; |
| 13 | +import {Inject} from "@angular/core"; |
14 | 14 | import {ViewContext, ViewConfig} from "../view/interface";
|
15 | 15 | import {Ng2ViewDeclaration} from "./interface";
|
16 | 16 | import {ng2ComponentInputs} from "./componentUtil";
|
@@ -96,7 +96,7 @@ export interface ParentUiViewInject {
|
96 | 96 | export class UiView {
|
97 | 97 | @Input('name') name: string;
|
98 | 98 | @Input('ui-view') set _name(val) { this.name = val; }
|
99 |
| - componentRef: ComponentRef; |
| 99 | + componentRef: ComponentRef<any>; |
100 | 100 | deregister: Function;
|
101 | 101 | uiViewData: any = {};
|
102 | 102 |
|
@@ -161,7 +161,7 @@ export class UiView {
|
161 | 161 | // Get the component class from the view declaration. TODO: allow promises?
|
162 | 162 | let componentType = <Type> viewDecl.component;
|
163 | 163 |
|
164 |
| - let createComponent = (factory: ComponentFactory) => { |
| 164 | + let createComponent = (factory: ComponentFactory<any>) => { |
165 | 165 | let parentInjector = this.viewContainerRef.injector;
|
166 | 166 | let childInjector = ReflectiveInjector.resolveAndCreate(rawProviders, parentInjector);
|
167 | 167 | let ref = this.componentRef = this.viewContainerRef.createComponent(factory, undefined, childInjector);
|
|
0 commit comments