Add support to .component from Angularjs 1.5

This commit is contained in:
André Junges
2015-12-15 23:00:36 -02:00
parent 24e12a7af9
commit c7f2c23618
+24
View File
@@ -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<string>|Function,
templateUrl?: string,
transclude?: boolean
}
///////////////////////////////////////////////////////////////////////////
// Directive