I wrote a table in angularJS, and then found a piece of code on the Internet to export the data to excel. JavaScript is OK, but when I put the code into angular,
this error will be reported when the click event is triggered
, I checked online and found that the error was reported because there were multiple $ executions. Others were caused by $apply in angular, but how could the JavaScript click event cause such an error? I'm really confused, please give me some advice...
Wrap the code that calls the click event with setTimeout() and try it
There is $timeout inside angularjs
First inject $timeout into your controller
$timeout(function() {
});