L
L
lightalex2017-01-22 23:20:39
JavaScript
lightalex, 2017-01-22 23:20:39

How to trigger click with AngularJS?

How to trigger click on a.clear-all.ng-scope using AngularJS?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
profesor08, 2017-01-22
@profesor08 Куратор тега JavaScript

function clickOnUpload() {
  $timeout(function() {
    angular.element('#myselector').triggerHandler('click');
  });
};

// Using Angular Extend
angular.extend($scope, {
  clickOnUpload: clickOnUpload
});

// OR Using scope directly
$scope.clickOnUpload = clickOnUpload;

Источник: stackoverflow.com/questions/22447374/how-to-trigge...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question