How to add an expression to a parameter elementpassed to a directive function link?
For example, inside the directive I want to add this:
element.setAttribute('ng-disabled','{{disabled}}');
If the property is disabled in the directive scope.
There is no template in the directive, it just uses the parameter elementpassed to.
I think I should recompile the element using the scope of the directive, but I'm not sure if this will recompile the directive either.
I know that I can disable $watchand disable the disabled property for an element, but I'm trying to figure out if I can add dynamic attributes.
Thank.
source
share