Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

md-text-float doesn't accept expression as label #462

Closed
iasandcb opened this issue Oct 22, 2014 · 2 comments
Closed

md-text-float doesn't accept expression as label #462

iasandcb opened this issue Oct 22, 2014 · 2 comments

Comments

@iasandcb
Copy link

For example,

<md-text-float label="{{questions}}" ng-model="score"></md-text-float>

shows nothing for label.

@KevinGaudin
Copy link

I'm trying to use angular-translate to display translated labels in md-text-float and meet the same issue.

<md-text-float label="{{'QUESTIONS_PER_ROUND'|translate}}" ng-model="nbQuestions"></md-text-float>

The result is:

<md-input-group ng-disabled="isDisabled" label="Questions par tour:" ng-model="nbQuestions" class="ng-isolate-scope ng-valid md-input-has-value ng-touched" type="text" tabindex="0" aria-invalid="false">
    <label for="" class="ng-binding">QUESTIONS_PER_ROUND</label>
    <input id="" ng-model="value" tabindex="0" type="text" aria-invalid="false" class="ng-valid">
</md-input-group>

So the label in the md-input-group is correctly translated but the label subelement did not receive the translation.

@KevinGaudin
Copy link

After reading the source code I understand that md-text-float is pretty limited for the moment, I needed ng-change on the input fields too and it's not supported. For the moment I'm using directly the md-input-group + label + input and it's nice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants