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...
PHP中文网2017-07-05 10:37:55
There is $timeout inside angularjs
First inject $timeout into your controller
$timeout(function() {
... // 执行你的click代码
});