Skip to content

Setting debugInfoEnabled(false) breaks the directive #12

@Xandroid4Net

Description

@Xandroid4Net

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);

    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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions