javascript - AngularJS checkbox checked custom value -
I'm trying to check a box by default with a custom value.
Are you ready? & Lt; Input type = "checkbox" ng-model = "checked" ng-init = "check = true" ng-true-value = "make sure" ng-fault-value = "no" & gt; & Lt; Br / & gt; & Lt; TT & gt; {{Check}} & lt; / TT & gt; & Lt; Br / & gt; If I do not show anything until I click on the box, is there any way where it can be checked with the default value of something other than the Boolean value?
ng-true value = "sure" . Therefore, ng-init = "checked = 'confirm'" code snippet
& lt; Input type = "checkbox" ng-model = "checked" ng-init = "check = 'fixed' ng-true-value =" make sure "ng-fault-value =" no "& gt; Plunker -
Comments
Post a Comment