if (!this.id) {
this.id = 0;
}
//var id = element.scope().$id; ---This is the line that causes the problem. scope() is not available when debugInfo is disabled.
this.classes = {};
for (var key in classes) {
this.classes[key] = classes[key] + '-' + this.id;
}
this.id += 1;
Adding the following to your angular app breaks the directive
app.config(['$compileProvider', function ($compileProvider) { $compileProvider.debugInfoEnabled(false); }]);
Here is the change I added, it seems to work for me, but you may know of a better one.
function Sortable(element, options) { this.options = $.extend({ items: '.sortable', handles: null, zindex: '9000', dragX: true, dragY: true, onChange: null, onDragstart: null, onDrag: null, onDragend: null }, options);