Aviel Fedida Aviel Fedida - 3 months ago 37
Javascript Question

Angularjs: Get element in controller

I am new to angularjs, I know that

represent a connection between the controller and the view, But is there a way besides looking for
to get the scope element, I mean something like that:

function someControllerFunc($scope){

I know that same controller can be assigned to multiple scopes, So maybe it is not possible, If anyone know a way to do it i will be very thankful, Thank you all and have a nice day.


You can pass in the element to the controller, just like the scope:

function someControllerFunc($scope, $element){