simple toggle

This commit is contained in:
Adam Bradley
2013-09-27 13:19:01 -05:00
parent 0823b58d8e
commit d03d3aa106
16 changed files with 242 additions and 70 deletions

23
js/views/toggleView.js Normal file
View File

@ -0,0 +1,23 @@
(function(ionic) {
ionic.views.Toggle = function(opts) {
this.el = opts.el;
this.checkbox = opts.checkbox;
this.track = opts.track;
this.handle = opts.handle;
};
ionic.views.Toggle.prototype = {
tap: function(e) {
alert( this.isOn() );
},
isOn: function() {
return this.checkbox.checked;
}
};
})(ionic);