dimanche 27 novembre 2016

Use standard inputs with angular material checkbox

Is there a way to us the normal input checkbox, for .NET forms? Or do I have to create my own directive/modify the material one to get this to work.

<md-checkbox ng-checked="$ctrl.checked = !$ctrl.checked">
    <input type="checkbox" name="test" value="1" />
</md-checkbox>

Obviously I could add the same ng-checked attribute to the input, however i feel this is a little unnecessary, I would have assumed a simple name attribute would automatically add in a hidden checkbox with a truthy value and automatically toggle the nested checkbox.




Aucun commentaire:

Enregistrer un commentaire