mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
26 lines
462 B
JavaScript
26 lines
462 B
JavaScript
(function(ionic) {
|
|
'use strict';
|
|
|
|
ionic.views.Checkbox = function(opts) {
|
|
this.el = opts.el;
|
|
this.checkbox = opts.checkbox;
|
|
this.handle = opts.handle;
|
|
};
|
|
|
|
ionic.views.Checkbox.prototype = {
|
|
|
|
tap: function(e) {
|
|
this.val( !this.checkbox.checked );
|
|
},
|
|
|
|
val: function(value) {
|
|
if(value === true || value === false) {
|
|
this.checkbox.checked = value;
|
|
}
|
|
return this.checkbox.checked;
|
|
}
|
|
|
|
};
|
|
|
|
})(ionic);
|