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