material icon indicating copy to clipboard operation
material copied to clipboard

mdAutocomplete's "ng-disabled" attribute should support expressions

Open bvaughn opened this issue 11 years ago • 4 comments

Perhaps I'm missing something, but why does mdAutocomplete specify a bi-directional binding for its isDisabled / ng-disabled attribute? Angular's ngDisabled directive supports expressions and it would be nice if the autocomplete directive did too. For example:

<md-autocomplete ng-disabled="conditionFoo || conditionBar">...</md-autocomplete>

Looking at the autocomplete directive, I don't see where the 2-way binding is being used for anything. Would you consider replacing it with an "@" binding and an attr.$observe? I'd be willing to submit a pull request but I thought I'd ask first. :)

bvaughn avatar Apr 04 '15 02:04 bvaughn

+1

lucasmartinez avatar Apr 08 '15 01:04 lucasmartinez

@bvaughn Definitely submit a PR for this. There are definitely still clean-up tasks needed for md-autocomplete, so one less task is always welcome. =)

robertmesserle avatar Apr 24 '15 21:04 robertmesserle

@bvaughn scratch that, submitted a fix. =p

robertmesserle avatar Apr 24 '15 21:04 robertmesserle

Haha, thanks Robert. I should have submitted one when I filed the ticket. Sorry! :)

bvaughn avatar Apr 24 '15 22:04 bvaughn