Component controller can be array

angular.module(.....).component("componentName", {
  controller: ["$rootScope",function($rootScope) {
}],
  template: ....
}
This commit is contained in:
Boris Prpic
2016-02-13 21:54:57 +01:00
parent 7677a9f3aa
commit 1c4a34873c

View File

@@ -1685,7 +1685,7 @@ declare module angular {
* Controller constructor function that should be associated with newly created scope or the name of a registered
* controller if passed as a string. Empty function by default.
*/
controller?: string | Function;
controller?: any;
/**
* An identifier name for a reference to the controller. If present, the controller will be published to scope under
* the controllerAs name. If not present, this will default to be the same as the component name.