Merge pull request #7222 from andrejunges/master

Add support to .component from Angularjs 1.5
This commit is contained in:
Masahiro Wakame
2015-12-23 15:27:03 +09:00
+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