How to include drag and drop to my list ?
file: list.tpl.html
<div class="panel-body">
<table class="table table-striped">
<thead>
<tr>
<th>Lp.</th>
<th>Nazwa</th>
<th>Estymacja</th>
<th>Data</th>
<th>Ico</th>
<th>Zaznacz jako wykonane</th>
</tr>
</thead>
<tr data-ng-repeat="todo in todos">
<td>{{$index+1}}. </td>
<td><span class="done-{{todo.done}}">{{todo.title}}</span></td>
<td><span class="done-{{todo.done}}">({{todo.estimates}}h)</span></td>
<td><span class="done-{{todo.done}}">{{todo.date}}</span></td>
<td><span class="glyphicon glyphicon-{{todo.type.gico}} done-{{todo.done}}"></span></td>
<td><input type="checkbox" data-ng-model="todo.done" title="Mark Complete" /></td>
</tr>
</table>
file: list-ctrl.js
app.controller('listCtrl', function ($scope) {
$scope.deleteCompleted = function () {
$scope.$parent.todos = $scope.$parent.todos.filter(function (item) {
return !item.done;
});
};
});
I'm learning AngularJS, so thanks for help !