8000 Merge pull request #101 from thgreasi/master · angular-ui/ui-sortable@a3c05ea · GitHub
[go: up one dir, main page]

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

Commit a3c05ea

Browse files
committed
Merge pull request #101 from thgreasi/master
Added notes about single ng-repeat element supported inside directive.
2 parents 27569fa + 7acf969 commit a3c05ea

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ Apply the directive to your form elements:
3232
</ul>
3333
```
3434

35-
**Note:** `ng-model` is required, so that the directive knows which model to update.
35+
**Developing Notes:**
36+
37+
* `ng-model` is required, so that the directive knows which model to update.
38+
* `ui-sortable` element should only contain one `ng-repeat` and not any other elements (above or below).
39+
Otherwise the index matching of the generated DOM elements and the `ng-model`'s items will break.
40+
* `ui-sortable` lists containing many 'types' of items can be implemented by using [dynamic template loading with ng-include](http://stackoverflow.com/questions/14607879/angularjs-load-dynamic-template-html-within-directive/14621927#14621927), to determine how each model item should be rendered.
41+
3642

3743
### Options
3844

0 commit comments

Comments
 (0)
0