Files
ionic-framework/js/views/checkboxView.js
Max Lynch 6ab1f49688 Fixed #64 and fixed sub view controllers and tabs
Moved tabs to be absolute not fixed so they can easily
be placed inside of containers
2013-11-08 18:09:48 -06:00

24 lines
475 B
JavaScript

(function(ionic) {
'use strict';
ionic.views.Checkbox = ionic.views.View.inherit({
initialize: function(opts) {
this.el = opts.el;
this.checkbox = opts.checkbox;
this.handle = opts.handle;
},
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);