Hi, I have an ion-view where I need to hide the ion-view header dynamicaly and enable it back if the user presses a button
I’ve tried the following
<ion-view title="Montage View" class="bar-stable" cache-view="false" hide-nav-bar="{{minimal}}">
Where minimal gets toggled when the user presses a button like so:
<button class="button button-icon button-clear ion-android-contract" ng-click="switchMinimal()"></button>
and in the controller:
$scope.minimal=false;
$scope.switchMinimal = function()
{
$scope.minimal = !$scope.minimal;
console.log ("Hide Statusbar");
ionic.Platform.fullScreen(true,false);
};
This does not hide the nav-bar as when it is first loaded, minimal is false. I tried adding
$state.go($state.current, {}, {reload: true});
inside switchMinial() but that also resets the minimal flag. I also tried $state.refresh() - they both seem to re-initialize the controller
Any ideas?