Fixed #40 with test

This commit is contained in:
Max Lynch
2013-10-29 14:27:54 -05:00
parent 01bbf5c1fa
commit 082259dcfb
7 changed files with 65 additions and 8 deletions

View File

@ -858,6 +858,14 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
angular.extend(this, ionic.controllers.TabBarController.prototype);
ionic.controllers.TabBarController.call(this, {
controllerChanged: function(oldC, oldI, newC, newI) {
$scope.controllerChanged && $scope.controllerChanged({
oldController: oldC,
oldIndex: oldI,
newController: newC,
newIndex: newI
});
},
tabBar: {
tryTabSelect: function() {},
setSelectedItem: function(index) {},
@ -891,7 +899,8 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
restrict: 'E',
replace: true,
scope: {
animation: '@'
animation: '@',
controllerChanged: '&'
},
transclude: true,
controller: 'TabsCtrl',