Given the JSON data:
{
user: {
agree: false
}
}
Use the following markup to create a two-way binding with a checkbox:
<input type="checkbox" is="data-checkbox" model="{{user.agree}}" id="cbAgree">
<label for="cbAgree">I agree to the bogus <a href="#">Terms of service</a>.</label>
model: Boolean
Properties inherited from DataElementBehaviors.Basic:
error: String
name: String
valid: Boolean
*All other HTML5 properties.
Methods inherited from DataElementBehaviors.Basic:
addValidator(validatorFn, errorMessage)
on(eventName, handlerFn)
setValidity(isValid, errorMessage)
validate()
*All other HTML5 methods.
Events inherited from DataElementBehaviors.Basic:
data-element-added
validation
*All other HTML5 events.