I am trying to implement inline editing on datatables in AngularJS. I was trying to find some example but i couldn't. There is a good example here, but it is not compatible with AngularJS. So, how can i implement it in AngularJS?
Related code from my project:
<tbody>
<tr ng-repeat="meal in meals">
<td>{{ meal.id }}</td>
<td>{{ meal.name }}</td>
<td>
<a ng-click="open_yemek('lg', meal.name, meal.recipe, meal.ingredients)">Tıklayın</a>
</td>
<td class="text-center">
<!--<small class="label label-warning" style="font-size: 9px !important;"><i class="fa fa-clock-o"></i> {{ yemek.sure }}</small>-->
{{ meal.time }}
</td>
<td>{{ meal.category }}</td>
<td>{{ meal.region }}</td>
<td>{{ meal.user }}</td>
<td class="text-center">{{ meal.rank }}/10</td>
<td>{{ meal.status }}</td>
<td>
<i ng-click="editItem($index)" class="fa fa-pencil-square-o" aria-hidden="true"></i>
<a ng-click="removeItem('yemekler',$index)"><i class="fa fa-trash-o" aria-hidden="true"></i></a>
<a ng-click="addItem('yemekler')"><i aria-hidden="true" class="fa fa-plus"></i></a>
</td>
</tr>
</tbody>
This is the JS:
$scope.dtOptions = DTOptionsBuilder.newOptions()
.withOption('lengthMenu', [5, 10, 15])
.withOption('autoWidth', true);
$scope.meals = {};
mealFactory.get()
.success(function(data) {
console.log(data);
$scope.meals = data;
});
