Added scope events for tab bar

This commit is contained in:
Max Lynch
2013-11-18 10:14:24 -06:00
parent 136ba7262d
commit f0b7ef6f89

View File

@ -90,6 +90,7 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
$scope.$watch('isVisible', function(value) { $scope.$watch('isVisible', function(value) {
if(childElement) { if(childElement) {
$animate.leave(childElement); $animate.leave(childElement);
$scope.$broadcast('tab.hidden');
childElement = undefined; childElement = undefined;
} }
if(childScope) { if(childScope) {
@ -102,6 +103,8 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
childElement = clone; childElement = clone;
childElement.addClass('view-full'); childElement.addClass('view-full');
$animate.enter(clone, $element.parent(), $element); $animate.enter(clone, $element.parent(), $element);
$scope.$broadcast('tab.shown');
}); });
} }
}); });