From f3eb60e55aa648b590e08e2881d3f159788f3bad Mon Sep 17 00:00:00 2001 From: Tushar Sonawane Date: Wed, 23 Dec 2015 15:47:37 +0530 Subject: [PATCH] updating angular.component type as per doc --- angularjs/angular.d.ts | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 713e6681dc..97477e9a81 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -165,7 +165,7 @@ declare module angular { dot: number; codeName: string; }; - + /** * If window.name contains prefix NG_DEFER_BOOTSTRAP! when angular.bootstrap is called, the bootstrap process will be paused until angular.resumeBootstrap() is called. * @param extraModules An optional array of modules that should be added to the original list of modules that the app was about to be bootstrapped with. @@ -1626,22 +1626,28 @@ declare module angular { */ totalPendingRequests: number; } - + /////////////////////////////////////////////////////////////////////////// // Component // see http://angularjs.blogspot.com.br/2015/11/angularjs-15-beta2-and-14-releases.html // and http://toddmotto.com/exploring-the-angular-1-5-component-method/ /////////////////////////////////////////////////////////////////////////// - + interface IComponentOptions { - bindings?: Object, - controller: Function|string, - controllerAs?: string, - isolate?: boolean, - restrict?: string, - template?: Array|Function, - templateUrl?: string, - transclude?: boolean + bindings?: Object; + controller?: string | Function; + controllerAs?: string; + isolate?: boolean; + template?: string | IComponentTemplateFn; + templateUrl?: string | IComponentTemplateFn; + transclude?: boolean; + restrict?: string; + $canActivate?: Function; + $routeConfig?: Object; + } + + interface IComponentTemplateFn { + ( $element?: IAugmentedJQuery, $attrs?: IAttributes ): string; } ///////////////////////////////////////////////////////////////////////////