mercredi 1 mars 2017

How to have a floating label on md-input-container when ng-model is null

What I want to achieve is either this:

Option 1

Or this:

Option 2

Current Code:

<md-input-container  ng-if="!ctl.module.activeDate" placeholder = "NotSetted">
    <label>Activation Date</label>
    <md-datepicker ng-model="" disabled></md-datepicker>
</md-input-container>

This implementation is using angular material. I check with the ng-if if the activeDate is null, if it's not I have another md-input-container that get's the value, that is a "workaround" solution, the best way would be to have all of that logic in the same md-input-container.




Aucun commentaire:

Enregistrer un commentaire