angular.module('ionic.ui.nav', ['ionic.ui']) .controller('NavCtrl', function($scope, $element, $compile) { var _this = this; angular.extend(this, ionic.controllers.NavController.prototype); ionic.controllers.NavController.call(this, { content: { }, navBar: { shouldGoBack: function() { }, setTitle: function(title) { $scope.title = title; }, showBackButton: function(show) { }, } }); $scope.controllers = this.controllers; $scope.getTopController = function() { return $scope.controllers[$scope.controllers.length-1]; } $scope.pushController = function(controller) { _this.push(controller); } $scope.navController = this; }) .directive('navController', function() { return { restrict: 'E', replace: true, transclude: true, controller: 'NavCtrl', //templateUrl: 'ext/angular/tmpl/ionicTabBar.tmpl.html', template: '