Skip to content

Looking to disable the directive based on condition #59

@jmanuelrd

Description

@jmanuelrd

Hi, thank you for this great directive, I would like to disable/enable the directive based on a condition, is that possible with the existing code? if not, would it be a major change?

I'm thinking on something like this:

or

Angular doesn't have a way to dynamically add/remove directives, that would require re-compiling, so my approach would be to always add the directive but enable/disable it's functionality based on a condition/boolean.

Thanks!

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