mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
Updating tests, fixing some old toggle and tab stuff
This commit is contained in:
8
dist/js/ionic-angular.js
vendored
8
dist/js/ionic-angular.js
vendored
@ -867,7 +867,7 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
||||
|
||||
this.add = function(controller) {
|
||||
this.addController(controller);
|
||||
this.select(0);
|
||||
this.select(0);
|
||||
};
|
||||
|
||||
this.select = function(controllerIndex) {
|
||||
@ -982,13 +982,15 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
||||
index: '='
|
||||
},
|
||||
link: function(scope, element, attrs, tabsCtrl) {
|
||||
if(attrs.icon) {
|
||||
scope.iconOn = scope.iconOff = attrs.icon;
|
||||
}
|
||||
scope.selectTab = function(index) {
|
||||
tabsCtrl.select(scope.index);
|
||||
};
|
||||
},
|
||||
template:
|
||||
'<a href="#" ng-class="{active:active}" ng-click="selectTab()" class="tab-item">' +
|
||||
'<i class="{{icon}}" ng-if="icon"></i>' +
|
||||
'<i class="{{iconOn}}" ng-if="active"></i>' +
|
||||
'<i class="{{iconOff}}" ng-if="!active"></i> {{title}}' +
|
||||
'</a>'
|
||||
@ -1046,7 +1048,7 @@ angular.module('ionic.ui.toggle', [])
|
||||
if(!ngModel) { return; }
|
||||
|
||||
checkbox = $element.children().eq(0);
|
||||
handle = track.children().eq(0);
|
||||
handle = $element.children().eq(1);
|
||||
|
||||
if(!checkbox.length || !handle.length) { return; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user