@@ -3,7 +3,7 @@ import { ng as angular } from "../../angular";
3
3
import {
4
4
State , Obj , pick , forEach , anyTrueR , unnestR , tail , extend , kebobString ,
5
5
isArray , isInjectable , isDefined , isString , isObject , services , trace ,
6
- ViewConfig , ViewService , ViewConfigFactory , PathNode , ResolveContext , Resolvable , RawParams
6
+ ViewConfig , ViewService , ViewConfigFactory , PathNode , ResolveContext , Resolvable , RawParams , IInjectable
7
7
} from "ui-router-core" ;
8
8
import { Ng1ViewDeclaration } from "../interface" ;
9
9
import { TemplateFactory } from "../templateFactory" ;
@@ -110,7 +110,7 @@ let id = 0;
110
110
export class Ng1ViewConfig implements ViewConfig {
111
111
$id = id ++ ;
112
112
loaded : boolean = false ;
113
- controller : Function ;
113
+ controller : Function ; // actually IInjectable|string
114
114
template : string ;
115
115
locals : any ; // TODO: delete me
116
116
@@ -156,7 +156,7 @@ export class Ng1ViewConfig implements ViewConfig {
156
156
*
157
157
* @returns {Function|Promise.<Function> } Returns a controller, or a promise that resolves to a controller.
158
158
*/
159
- getController ( context : ResolveContext ) : ( String | Function | Promise < Function | String > ) {
159
+ getController ( context : ResolveContext ) : ( IInjectable | string | Promise < IInjectable | string > ) {
160
160
let provider = this . viewDecl . controllerProvider ;
161
161
if ( ! isInjectable ( provider ) ) return this . viewDecl . controller ;
162
162
let deps = services . $injector . annotate ( provider ) ;
0 commit comments