I use material.angular for my user formular, the input "name" is like that :
<md-text-float label="Username" ng-model="userEdit.user.nickname"></md-text-float>
And I want to add the "required" attribute to the input previously created, but it seems to be hard, material allow me to specify a type or the "disabled" attr but nothing else.
Can I add an attribute after the creation of the field ?
You can now use the 'required' attribute on <md-text-float> element,
It's working on version v0.6.1-master-fc723d4
If you need other attributes to pass along to your <input> element, you could use the following:
<md-input-group class="md-default-theme">
<label for="">something </label>
<md-input ng-model="myValue" ng-change="doSomethingOnChange()" ng-blur="doSomethingOnBlur()" autocapitalize="off" type=""></md-input>
</md-input-group>
a working codepen
see this discussion on github
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With