mardi 25 mars 2014

How do you select an element inside an ng-controller?


Vote count:

0




I have two controllers, A and B. Either controller can change whether the list or article is visible in controller B through the use of a service that controller B gives its scope to (both controllers have the service injected).


But how at any arbitrary point can I get a reference to the list and the iframe? I would like to be able to do:



$animate.removeClass(list, "ng-hide", callback);
$animate.addClass(article, "ng-show", callback);


and vice versa.


This plunkr is all set up.


enter image description here



asked 2 mins ago






Aucun commentaire:

Enregistrer un commentaire