mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-06 22:29:44 +08:00
Added scope events for tab bar
This commit is contained in:
3
js/ext/angular/src/directive/ionicTabBar.js
vendored
3
js/ext/angular/src/directive/ionicTabBar.js
vendored
@ -90,6 +90,7 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
||||
$scope.$watch('isVisible', function(value) {
|
||||
if(childElement) {
|
||||
$animate.leave(childElement);
|
||||
$scope.$broadcast('tab.hidden');
|
||||
childElement = undefined;
|
||||
}
|
||||
if(childScope) {
|
||||
@ -102,6 +103,8 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
||||
childElement = clone;
|
||||
childElement.addClass('view-full');
|
||||
$animate.enter(clone, $element.parent(), $element);
|
||||
|
||||
$scope.$broadcast('tab.shown');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user