From c7f2c236186e7da6b3711bcafc0469786622ffc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Junges?= Date: Tue, 15 Dec 2015 23:00:36 -0200 Subject: [PATCH] Add support to .component from Angularjs 1.5 --- angularjs/angular.d.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index a489141d54..713e6681dc 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -181,6 +181,13 @@ declare module angular { animation(name: string, animationFactory: Function): IModule; animation(name: string, inlineAnnotatedFunction: any[]): IModule; animation(object: Object): IModule; + /** + * Use this method to register a component. + * + * @param name The name of the component. + * @param options A definition object passed into the component. + */ + component(name: string, options: IComponentOptions): IModule; /** * Use this method to register work which needs to be performed on module loading. * @@ -1619,6 +1626,23 @@ 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 + } /////////////////////////////////////////////////////////////////////////// // Directive