I’ve forked this on Codepen: http://codepen.io/anon/pen/wGrBd?editors=101
I also search in ionic.bundle.js and found this in ionNavBar directive (line 35386):
$scope.backButtonShown = false; $scope.shouldAnimate = true; $scope.isReverse = false; $scope.isInvisible = true; $scope.$parent.$hasHeader = true;
$scope.$on('$destroy', function() { $scope.$parent.$hasHeader = false; });
$scope.$watch(function() { return ($scope.isReverse ? ' reverse' : '') + ($scope.isInvisible ? ' invisible' : '') + (!$scope.shouldAnimate ? ' no-animation' : ''); }, function(className, oldClassName) { $element.removeClass(oldClassName); $element.addClass(className); });
Is $scope.isInvisible always set to true? So the navbar cannot show on browser?
Maybe it has wrong in my html, but I’m not sure. Can someone tell me how to fix this?
Thank so much and sorry for my bad English!
Edit:
I read the ionic beta document again and found that we can control navbar directive by using $ionicNavBarDelegate
$ionicNavBarDelegate.showBackButton(true); $ionicNavBarDelegate.showBar(true);