I am using angular-ui for sortable using ui-sortable directive. Is it possible to dynamically enable/disable sortable functionality based on the scope state? So I need to have a
You could use ui-if
to toggle between a ui-sortable
version and a non-sortable version, however this is a horrible design. However if you checked out the jQuery Sortable Docs it seems that there's an option for disabled
. If the directive currently watches the options object for changes, you could simply toggle this option. If the options object is watched by reference and not by value, then perhaps you should open a pull-request with the tweak?