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

Commit 5ba4eb7

Browse files
committed
Merge pull request #4 from robjames/master
Allow for updates to the sortable options
2 parents d091d89 + 82a0b85 commit 5ba4eb7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/sortable.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ angular.module('ui.sortable', []).value('uiSortableConfig',{}).directive('uiSort
88
return {
99
require: '?ngModel',
1010
link: function(scope, element, attrs, ngModel) {
11-
var onReceive, onRemove, onStart, onStop, onUpdate, opts;
11+
var onReceive, onRemove, onStart, onStop, onUpdate, opts = {};
1212

13-
opts = angular.extend({}, uiSortableConfig, scope.$eval(attrs.uiSortable));
13+
attrs.$observe('ui-sortable', function(){
14+
opts = angular.extend({}, uiSortableConfig, scope.$eval(attrs.uiSortable));
15+
});
1416

1517
if (ngModel) {
1618

0 commit comments

Comments
 (0)