mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
sliderView: deprecate prev, add previous
This commit is contained in:
@@ -58,10 +58,10 @@ angular.module('ionic.ui.slideBox', [])
|
||||
'slide',
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $ionicSlideBoxDelegate#prev
|
||||
* @name $ionicSlideBoxDelegate#previous
|
||||
* @description Go to the previous slide. Wraps around if at the beginning.
|
||||
*/
|
||||
'prev',
|
||||
'previous',
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $ionicSlideBoxDelegate#next
|
||||
|
||||
@@ -56,12 +56,10 @@ describe('bar directives', function() {
|
||||
|
||||
angular.forEach([{
|
||||
tag: 'ion-header-bar',
|
||||
className: 'bar bar-header',
|
||||
controllerBind: '$ionicHeaderBarController'
|
||||
className: 'bar bar-header'
|
||||
}, {
|
||||
tag: 'ion-footer-bar',
|
||||
className: 'bar bar-footer',
|
||||
controllerBind: '$ionicFooterBarController'
|
||||
className: 'bar bar-footer'
|
||||
}], function(data) {
|
||||
describe(data.tag, function() {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<script src="../../../../dist/js/ionic.bundle.js"></script>
|
||||
</head>
|
||||
<body ng-controller="TestCtrl">
|
||||
<ion-header-bar class="bar-positive" model="barController">
|
||||
<ion-header-bar class="bar-positive">
|
||||
<div class="buttons">
|
||||
<button class="button">
|
||||
Hello <b>Hello</b>
|
||||
@@ -47,7 +47,6 @@
|
||||
document.body.appendChild(box);
|
||||
window.onresize = function() {
|
||||
var s = angular.element(document.getElementsByTagName('header')[0]).scope();
|
||||
s.barController.align(s.align);
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -58,11 +58,11 @@
|
||||
<ion-view title="Welcome">
|
||||
|
||||
<ion-nav-buttons side="left">
|
||||
<button ng-click="sideMenuController.toggleLeft(false)" class="button button-icon ion-navicon"></button>
|
||||
<button ng-click="toggleLeft()" class="button button-icon ion-navicon"></button>
|
||||
</ion-nav-buttons>
|
||||
|
||||
<ion-nav-buttons side="right">
|
||||
<button ng-click="sideMenuController.toggleRight(false)" class="button button-icon ion-navicon"></button>
|
||||
<button ng-click="toggleRight()" class="button button-icon ion-navicon"></button>
|
||||
</ion-nav-buttons>
|
||||
|
||||
<ion-content class="has-header" padding="true">
|
||||
@@ -235,11 +235,16 @@
|
||||
$urlRouterProvider.otherwise("/event/home");
|
||||
})
|
||||
|
||||
.controller('MainCtrl', function($scope) {
|
||||
console.log('MainCtrl');
|
||||
.controller('MainCtrl', function($scope, $ionicSideMenuDelegate) {
|
||||
|
||||
$scope.closeMenu = function() {
|
||||
$scope.sideMenuController.toggleLeft(false);
|
||||
$ionicSideMenuDelegate.toggleLeft(false);
|
||||
};
|
||||
$scope.toggleLeft = function() {
|
||||
$ionicSideMenuDelegate.toggleLeft();
|
||||
};
|
||||
$scope.toggleRight = function() {
|
||||
$ionicSideMenuDelegate.toggleRight();
|
||||
};
|
||||
|
||||
$scope.range = [];
|
||||
|
||||
@@ -475,7 +475,7 @@ ionic.views.Slider = ionic.views.View.inherit({
|
||||
slide(to, speed);
|
||||
};
|
||||
|
||||
this.prev = function() {
|
||||
this.prev = this.previous = function() {
|
||||
// cancel slideshow
|
||||
stop();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user