fix view hideNavBar attribute, closes #394

This commit is contained in:
Adam Bradley
2014-01-12 13:41:00 -06:00
parent 71e1f98f19
commit ff310600d9
5 changed files with 57 additions and 19 deletions

View File

@@ -58,10 +58,13 @@
</script>
<script id="forgot-password.html" type="text/ng-template">
<view title="'Forgot Password'">
<view title="'Forgot Password'" hide-nav-bar="true">
<content has-header="true" padding="true">
<p>Seriously!? Again?!</p>
<p>How about I just give you a password, hows this: <br><code>{{password}}</code></p>
<p>This view hides the nav bar using the hideNavBar attribute.</p>
<p>
<button ng-click="hideNavBar()">Hide Nav Bar</button>
<button ng-click="showNavBar()">Show Nav Bar</button>
</p>
<p>
<button ng-click="clearViewHistory()">Clear View History</button>
</p>
@@ -183,7 +186,7 @@
<p>
<button ng-click="hideBackButton()">Hide Back Button</button>
<button ng-click="showBackButton()">Show Back Button</button>
</p>
</p>
<p>
Current View: {{ $viewHistory.currentView }}<br>
Back View: {{ $viewHistory.backView }}<br>
@@ -304,19 +307,23 @@
})
.controller('SignInCtrl', function($scope, $state) {
//console.log('SignInCtrl');
$scope.signIn = function(user) {
$state.go('tabs.autolist');
};
})
.controller('ForgotPasswordCtrl', function(ViewService, $scope, $state) {
$scope.password = Math.round(Math.random() * 10000);
.controller('ForgotPasswordCtrl', function(ViewService, $rootScope, $scope, $state) {
$scope.clearViewHistory = function() {
ViewService.clearHistory();
};
$scope.hideNavBar = function() {
$rootScope.$broadcast('viewState.showNavBar', false);
};
$scope.showNavBar = function() {
$rootScope.$broadcast('viewState.showNavBar', true);
};
})
.controller('AutoListCtrl', function($scope, $state) {