How can I access a controller's dom element, for example if I want to
call a jquery function on a controller's div?
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
$element is going to be killed soon. You should never do any kind of dom manipulation in the controller. Use widget/directives for this purpose.
The reason why controllers should never reference the dom is because in order to avoid spaghetti code and make controllers testable, they should contain just business logic of your application.
/i