I have basic ng-repetition where the work is ordered
& lt; Div ng-sortable = "sortableOptions" & gt; & Lt; Div ng- repeat = "work in work" & gt; {{Task}} ...
When a task is dragged and left, it calls scope.sortableOptions in the $ controller. I am thinking that someone knows how can I cross that task? Can I set it as functions or ..
Actually, I want to pass the work and want to change the properties in one.
$ scope SortableOptions2 = {stop: function (Event, UI) {// Do something with specific Todos here}); }
thanks u
If you are using yes If so, you can do this,
& lt; Ul-data-sort = "sorted options" data-ng-model = "todo" & gt; & Lt; Li data-ng-repeat = "item in Todd" -sorted-item-data-gt; & Lt; Div-data-sort-item-handle & gt; & Lt; / Div & gt; & Lt; / Li & gt; & Lt; / Ul & gt;
and in your controller,
$ scope.sortableOptions = {accept: function (sourceItemHandleScope, destSortableScope) {return boolean} // determine the drag Whether the override is allowed or not the default is true. ItemMoved: function (event) {// what you want}, order changed: function (event) {// what you want to do}, prevention: '# boards' // optional param. };
No comments:
Post a Comment