Material: md-autocomplete md-floating-label is string, not expression

Created on 31 Jul 2015  路  6Comments  路  Source: angular/material

This means that you can't use 'dynamic' labels, e.g.: <md-autocomplete md-floating-label="ctrl.myLabel">

review won't fix

Most helpful comment

For a workaround, I got dynamic labels to work using ng-attr. Should also work for placeholder.

<md-autocomplete ng-attr-md-floating-label="{{label}}"></md-autocomplete>

All 6 comments

Hello - Is this going to be fixed any time soon? I am trying to do use md-floating-label in my directive using md-autocomplete if a certain variable is true and placeholder if not. I can't get md-floating-label to be removed as a attribute though, so the floating label is included even when I don't want it.

+1

+1

For a workaround, I got dynamic labels to work using ng-attr. Should also work for placeholder.

<md-autocomplete ng-attr-md-floating-label="{{label}}"></md-autocomplete>

Yes i am working with autocomplete label but i am unable to translate it as it don't accept any expression and will show the expression as a static string.......please fix it soon .......... Thanks

+1

Was this page helpful?
0 / 5 - 0 ratings