I study js framework Angular. Using the ng-click directive - I want to get an event object (they clicked on it) I know that jQquery uses $(this) . But how on angular to address event object by the convenient decision?
categoriesApp.controller('categoriesController', function($scope, $http){ $http.post('/user/GetCats').success(function(data){ $scope.categories = data; }); $scope.show = function() { if($(this).hasClass()) { //.......some code } } }); <input type="text" class="for-open-in53" placeholder="Укажите специализацию" ng-click="show($event)">
$scope.show = function(e){}in the argument will be passed to the DOM, as I understand it. Or an object that has a link to it. For example,e.target- oshliaer