mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(toggle): Disable toggle w/ ng-disabled, closes #541
This commit is contained in:
1
js/ext/angular/src/directive/ionicToggle.js
vendored
1
js/ext/angular/src/directive/ionicToggle.js
vendored
@@ -35,7 +35,6 @@ angular.module('ionic.ui.toggle', [])
|
||||
if(attr.ngChecked) input.attr('ng-checked', 'ngChecked');
|
||||
if(attr.ngTrueValue) input.attr('ng-true-value', attr.ngTrueValue);
|
||||
if(attr.ngFalseValue) input.attr('ng-false-value', attr.ngFalseValue);
|
||||
if(attr.ngDisabled) input.attr('ng-false-value', attr.ngFalseValue);
|
||||
|
||||
// return function link($scope, $element, $attr, ngModel) {
|
||||
// var el, checkbox, track, handle;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<html ng-app="toggleTest">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Radio</title>
|
||||
<title>Toggle</title>
|
||||
|
||||
<!-- Sets initial viewport load and disables zooming -->
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
|
||||
@@ -84,3 +84,7 @@
|
||||
right: $item-padding;
|
||||
z-index: $z-index-item-toggle;
|
||||
}
|
||||
|
||||
.toggle input:disabled + .track {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user