mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
Tab stuff
This commit is contained in:
14
dist/js/ionic-angular.js
vendored
14
dist/js/ionic-angular.js
vendored
@ -1022,6 +1022,11 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
|||||||
return function($scope, $element, $attr, tabsCtrl) {
|
return function($scope, $element, $attr, tabsCtrl) {
|
||||||
var childScope, childElement;
|
var childScope, childElement;
|
||||||
|
|
||||||
|
$scope.title = $attr.title;
|
||||||
|
$scope.icon = $attr.icon;
|
||||||
|
$scope.iconOn = $attr.iconOn;
|
||||||
|
$scope.iconOff = $attr.iconOff;
|
||||||
|
tabsCtrl.add($scope);
|
||||||
|
|
||||||
$scope.$watch('isVisible', function(value) {
|
$scope.$watch('isVisible', function(value) {
|
||||||
if(childElement) {
|
if(childElement) {
|
||||||
@ -1041,13 +1046,6 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.title = $attr.title;
|
|
||||||
$scope.icon = $attr.icon;
|
|
||||||
$scope.iconOn = $attr.iconOn;
|
|
||||||
$scope.iconOff = $attr.iconOff;
|
|
||||||
tabsCtrl.add($scope);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -1061,7 +1059,7 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
|||||||
transclude: true,
|
transclude: true,
|
||||||
replace: true,
|
replace: true,
|
||||||
scope: true,
|
scope: true,
|
||||||
template: '<div class="tabs tabs-primary">' +
|
template: '<div class="tabs tabs-icon-top tabs-primary">' +
|
||||||
'<tab-controller-item title="{{controller.title}}" icon="{{controller.icon}}" icon-on="{{controller.iconOn}}" icon-off="{{controller.iconOff}}" active="controller.isVisible" index="$index" ng-repeat="controller in controllers"></tab-controller-item>' +
|
'<tab-controller-item title="{{controller.title}}" icon="{{controller.icon}}" icon-on="{{controller.iconOn}}" icon-off="{{controller.iconOff}}" active="controller.isVisible" index="$index" ng-repeat="controller in controllers"></tab-controller-item>' +
|
||||||
'</div>'
|
'</div>'
|
||||||
};
|
};
|
||||||
|
|||||||
14
js/ext/angular/src/directive/ionicTabBar.js
vendored
14
js/ext/angular/src/directive/ionicTabBar.js
vendored
@ -80,6 +80,11 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
|||||||
return function($scope, $element, $attr, tabsCtrl) {
|
return function($scope, $element, $attr, tabsCtrl) {
|
||||||
var childScope, childElement;
|
var childScope, childElement;
|
||||||
|
|
||||||
|
$scope.title = $attr.title;
|
||||||
|
$scope.icon = $attr.icon;
|
||||||
|
$scope.iconOn = $attr.iconOn;
|
||||||
|
$scope.iconOff = $attr.iconOff;
|
||||||
|
tabsCtrl.add($scope);
|
||||||
|
|
||||||
$scope.$watch('isVisible', function(value) {
|
$scope.$watch('isVisible', function(value) {
|
||||||
if(childElement) {
|
if(childElement) {
|
||||||
@ -99,13 +104,6 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.title = $attr.title;
|
|
||||||
$scope.icon = $attr.icon;
|
|
||||||
$scope.iconOn = $attr.iconOn;
|
|
||||||
$scope.iconOff = $attr.iconOff;
|
|
||||||
tabsCtrl.add($scope);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -119,7 +117,7 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
|||||||
transclude: true,
|
transclude: true,
|
||||||
replace: true,
|
replace: true,
|
||||||
scope: true,
|
scope: true,
|
||||||
template: '<div class="tabs tabs-primary">' +
|
template: '<div class="tabs tabs-icon-top tabs-primary">' +
|
||||||
'<tab-controller-item title="{{controller.title}}" icon="{{controller.icon}}" icon-on="{{controller.iconOn}}" icon-off="{{controller.iconOff}}" active="controller.isVisible" index="$index" ng-repeat="controller in controllers"></tab-controller-item>' +
|
'<tab-controller-item title="{{controller.title}}" icon="{{controller.icon}}" icon-on="{{controller.iconOn}}" icon-off="{{controller.iconOff}}" active="controller.isVisible" index="$index" ng-repeat="controller in controllers"></tab-controller-item>' +
|
||||||
'</div>'
|
'</div>'
|
||||||
};
|
};
|
||||||
|
|||||||
@ -74,7 +74,7 @@
|
|||||||
</content>
|
</content>
|
||||||
</tab>
|
</tab>
|
||||||
|
|
||||||
<tab title="About" icon="icon-ios7-clock" icon-off="icon-ios7-clock-outline">
|
<tab title="About" icon-on="icon-ios7-clock" icon-off="icon-ios7-clock-outline">
|
||||||
<header class="bar bar-header bar-secondary">
|
<header class="bar bar-header bar-secondary">
|
||||||
<h1 class="title">Deadlines</h1>
|
<h1 class="title">Deadlines</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
Reference in New Issue
Block a user