triggerHandler causing Error: [$rootScope:inprog] $apply already in progress error - AngularJS
问题 I am trying to trigger the click of a button when a key is pressed. I'm doing this using the triggerHandler function, but this is causing the error above. I'm thinking I must have created some kind of circular reference/loop, but I can't see where. This is my HTML: <button id="demoBtn1" hot-key-button hot-key="hotKeys.primaryTest" class="po-btn primary-btn" type="submit" ng-click="btnFunction()"></button> Here's my controller: .controller('BtnCtrl', function ($scope) { $scope.checkKeyPress =