So I have a good solution so far when the controller is a function.
I capture the function arguments, and use the array notation, ending in a
function, similar to the .controller syntax.
var clientControllerArgs = $injector.annotate(conf.controller);
clientControllerArgs.push(hitch(this, conf.controller));
angular.extend(this, $controller(clientControllerArgs, {
$scope: $scope,
modalManager: this._modalManager
}));
However this still leaves a problem for when they pass controller as a
string.
I was just browsing the $controller source, and see that they don't expose
the controller constructors, so I can't get a handle on a funciton if its
defined using .controller(...)
Any ideas?
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.