mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +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) {
|
$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');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user