Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 52da477

Browse files
committed
docs: add notice for DOM manipulations
1 parent a856bb5 commit 52da477

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ myAppModule.controller('MyController', function($scope) {
6464
</ul>
6565
```
6666

67+
When using event callbacks ([start](http://api.jqueryui.com/sortable/#event-start)/[update](http://api.jqueryui.com/sortable/#event-update)/[stop](http://api.jqueryui.com/sortable/#event-stop)...), avoid manipulating DOM elements (especially the one with the ng-repeat attached).
68+
The suggested pattern is to use callbacks for emmiting events and altering the scope (inside the 'Angular world').
69+
6770
#### Canceling
6871

6972
Inside the `update` callback, you can check the item that is dragged and cancel the sorting.

0 commit comments

Comments
 (0)