sliderView: deprecate prev, add previous

This commit is contained in:
Andy Joslin
2014-03-24 21:05:32 -06:00
parent c6dec3c472
commit 5da74bb736
5 changed files with 16 additions and 14 deletions

View File

@@ -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

View File

@@ -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() {

View File

@@ -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>

View File

@@ -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 = [];

View File

@@ -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();