got a problem with ng-click on angular datatables. I'm using https://l-lin.github.io/angular-datatables
Here is my code
$scope.dtOptions = DTOptionsBuilder.fromFnPromise(function(){
return $resource(APIROOT + 'categories').query().$promise;
})
.withOption('order', [0, "asc"]);
$scope.dtColumns = [
DTColumnBuilder.newColumn('id', 'ID').withOption('searchable', false),
DTColumnBuilder.newColumn('name', 'Name'),
DTColumnBuilder.newColumn('', 'Actions').renderWith(function (data, type, full, meta) {
return '<a class="btn btn-default btn-xs" href="#/edit/' + full.id + '"><i class="fa fa-pencil"></i></a> ' +
'<button class="btn btn-danger btn-xs" ng-click="deleteItem(' + full.id + ')"><i class="fa fa-trash"></i></button>';
})
];
$scope.deleteItem = function (id) {
alert('delete')
}
delete button is not working.
Is there anything wrong with the code?