Trigger click on closest div with angularJS
问题 Hi I've got follow code: angular.module("myApp", []).controller("myController", function($scope) { $scope.clickedInput = function() { setTimeout(function() { angular.element('.addon').triggerHandler('click'); }, 100); } $scope.clickedAddon = function(number) { console.log(number); } }); .wrapper { display: flex; flex-direction: column; } .inputWithAddon { display: flex; margin-bottom: 10px; } input { height: 20px; } .addon { width: 26px; height: 26px; background-color: green; } <script src=