button or A tag etc render by columnDefs options runs event twice.
button or A tag etc render by columnDefs options runs event twice.
This is source below.
$ scope.grid.dtC1. olumns = {
2. columnDefs: [
3. {
4. "targets": 8,
5. "render": function ( data, type, row ) {
6. return '<a ng-click="open(\'' + row.sku_code +'\')">test</a>'
7. }
8. }
9. ],
10.
11. var i = 0;1.
11. $scope.test = function (){
12. console.log(i);
13. i++;
14. }
15.
click the a tag(test), event runs twice. so result is 0 and 1
I wanna show just 0.
How do I?