Skip to content

Commit

Permalink
fix(typings): Change Ng1ViewDeclaration.controller type to IInjectabl…
Browse files Browse the repository at this point in the history
…e|string
  • Loading branch information
christopherthielen committed Nov 1, 2016
1 parent d2b5d84 commit 8e91dc9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ng1/statebuilders/views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ng as angular } from "../../angular";
import {
State, Obj, pick, forEach, anyTrueR, unnestR, tail, extend, kebobString,
isArray, isInjectable, isDefined, isString, isObject, services, trace,
ViewConfig, ViewService, ViewConfigFactory, PathNode, ResolveContext, Resolvable, RawParams
ViewConfig, ViewService, ViewConfigFactory, PathNode, ResolveContext, Resolvable, RawParams, IInjectable
} from "ui-router-core";
import { Ng1ViewDeclaration } from "../interface";
import { TemplateFactory } from "../templateFactory";
Expand Down Expand Up @@ -110,7 +110,7 @@ let id = 0;
export class Ng1ViewConfig implements ViewConfig {
$id = id++;
loaded: boolean = false;
controller: Function;
controller: Function; // actually IInjectable|string
template: string;
locals: any; // TODO: delete me

Expand Down Expand Up @@ -156,7 +156,7 @@ export class Ng1ViewConfig implements ViewConfig {
*
* @returns {Function|Promise.<Function>} Returns a controller, or a promise that resolves to a controller.
*/
getController(context: ResolveContext): (String|Function|Promise<Function|String>) {
getController(context: ResolveContext): (IInjectable|string|Promise<IInjectable|string>) {
let provider = this.viewDecl.controllerProvider;
if (!isInjectable(provider)) return this.viewDecl.controller;
let deps = services.$injector.annotate(provider);
Expand Down

0 comments on commit 8e91dc9

Please sign in to comment.