Hi Is there a cute way to inject code into a controller?
Like this:
<div ng-controller="myController">
...some HTML
<ng-include src="'/static/views/token.enroll.' + form.type + '.html'">
</div>
The inner html in the include is reloaded depending on the form.type.
Nice: Within these html-partial, I can also use the data binding to the
$scope.form object.
Well, now in one of these partial views I'd like to add some additional
logic, which I would like to add to the original "myController".
BUT: as the partials are loaded dynamically this can not be part of the
original, static controller.
Is there a way to add behaviours to the controller dynamically?
Thanks a lot
Cornelius
--
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.
signature.asc
Description: OpenPGP digital signature
