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

How to add ui-sortable attribute conditionally? #397

@im1dermike

Description

@im1dermike

It does not appear this directive has the ability to be added conditionally. If you attempted to implement this functionality like it's implemented for required and ng-required...

This: <ul ng-model="items" ui-sortable>

Would look like this: <ul ng-model="items" ui-sortable="isSortable">

Unfortunately, ui-sortable was designed to be able to take an optional options value. I believe this is also what makes the built-in ngAttr directive not work. https://docs.angularjs.org/guide/directive#text-and-attribute-bindings

Any way to get around this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions