亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - angularJS triggers click event and reports $rootScope:inprog error
巴扎黑
巴扎黑 2017-07-05 10:35:55
0
2
919

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...

巴扎黑
巴扎黑

reply all(2)
迷茫

Wrap the code that calls the click event with setTimeout() and try it

Ty80

There is $timeout inside angularjs
First inject $timeout into your controller
$timeout(function() {

  ...    // 執(zhí)行你的click代碼

});

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template