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

@ -47,8 +47,8 @@
}
</style>
</head>
<body>
<tabs animation="fade-in-out">
<body ng-controller="RootCtrl">
<tabs animation="fade-in-out" controller-changed="onControllerChanged(oldController, oldIndex, newController, newIndex)">
<tab title="Home" icon-on="icon-ios7-filing" icon-off="icon-ios7-filing-outline" ng-controller="HomeCtrl">
<header class="bar bar-header bar-secondary">
@ -111,6 +111,14 @@
<script>
angular.module('tabsTest', ['ionic.ui', 'ionic.service.modal', 'ionic.service.actionSheet'])
.controller('RootCtrl', function($scope) {
$scope.onControllerChanged = function(oldController, oldIndex, newController, newIndex) {
console.log('Controller changed', oldController, oldIndex, newController, newIndex);
console.log(arguments);
};
})
.controller('HomeCtrl', function($scope, Modal, ActionSheet) {
$scope.items = [];