mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
simple toggle
This commit is contained in:
23
dist/ionic.js
vendored
23
dist/ionic.js
vendored
@ -1964,6 +1964,29 @@ ionic.views.SideMenu.prototype = {
|
||||
}
|
||||
};
|
||||
})(window.ionic);
|
||||
;
|
||||
(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);
|
||||
;(function(ionic) {
|
||||
|
||||
ionic.controllers.NavController = function(opts) {
|
||||
|
||||
Reference in New Issue
Block a user