mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
24 lines
363 B
JavaScript
24 lines
363 B
JavaScript
|
|
(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);
|