如何创建动态调用ng-click

时间:2015-11-10 10:47:15

标签: javascript angularjs

如何从ng-click事件创建的showClientList函数创建对editClient的调用

$scope.showClientList=function(){

....
            $('<input/>').attr({
                type: 'button',
                id: 'editClient',
                value: 'Edit Client'
            }).appendTo(td).on('ng-click', editClient($scope.data.clients[i]));
            td.appendTo(tr);
            tr.appendTo(table);
}

$scope.editClient=function(client){
....
}

0 个答案:

没有答案