Skip to content

Commit 80ee6c2

Browse files
committed
test(tabs): add tab.shown catching to test page
Addresses #588
1 parent 69fda4e commit 80ee6c2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

js/ext/angular/test/tabs.html

+7
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ <h1 class="title">New Task</h1>
128128
angular.module('tabsTest', ['ionic'])
129129

130130
.controller('RootCtrl', function($scope, $timeout) {
131+
132+
$scope.$on('tab.shown', function() { console.error('tab.shown Root this should not happen'); });
133+
$scope.$on('tab.hidden', function() { console.error('tab.hidden Root this should not happen'); });
134+
131135
$scope.controllerChanged = function(event) {
132136
console.log('Controller changed', event);
133137

@@ -165,6 +169,9 @@ <h1 class="title">New Task</h1>
165169
$scope.settingsModal = modal;
166170
});
167171

172+
$scope.$on('tab.shown', function() { console.log('tab.shown Home'); });
173+
$scope.$on('tab.hidden', function() { console.log('tab.hidden Home'); });
174+
168175
var removeItem = function(item, button) {
169176
$ionicActionSheet.show({
170177
buttons: [],

0 commit comments

Comments
 (0)