Angular `ng-click` not working in DataTables table row

后端 未结 3 805
悲哀的现实
悲哀的现实 2021-01-13 15:40

I have an angular application that is also using jquery.dataTables. When I use datatables to build a dynamic table with th

3条回答
  •  鱼传尺愫
    2021-01-13 15:57

    this all for Jquery datatable.

    "Link": "

    write like this

      "Link": "

    this resolve my problem for Jquery datatable

    but if you have angulrjs datatable and you are unable to work with ng-click or other events of angulrjs then you just have to compile what like

    app.controller('auditListController', function($scope, $compile){ 
        html = "";
        $compile(angular.element(html).contents())($scope);
    
        $scope.myfunction = function (myvar) {
            console.log("myvar", myvar);
        }
    }
    

提交回复
热议问题