I have an angular controller that is instantiated several times on the same page. I want to select an element based on the class inside that controller.
HTML:
<div ng-controller="File" ng-switch-when="file" class="fine-uploader"><p class="button">1</p></div>
<div ng-controller="File" ng-switch-when="file" class="fine-uploader"><p class="button">2</p></div>
Javascript
function File($scope){
var button = angular.element(.button);
console.log(button);
}
I would like the console to log first the first button and then the second button.