I don’t know how to add a save button to system defined default navigation bar? So i did following:
I have a system default navigation bar throughout the app. I have a settings view and inside settings (on the click of a button) i open a new view… profile udpate view. Settings view contains the default navigation bar. But I needed a save button inside profile update ion view so i turned default navigation bar off by hide-nav-bar="true"
and created a custom navigation bar and put 2 buttons ‘save’ on the right and ‘back’ on the left.
<div class="bar bar-header-custom">
<button ng-click="GoBack()" class="button back-button buttons button-clear header-item">
<i class="icon ion-ios-arrow-back"></i><span>Back</span>
</button>
<div class="h1 title">Personal Details</div>
<button class="button button-clear button-positive"><span>Save</span></button>
</div>
I created a function called GoBack in my profile controller and used it to go back to settings when i click Back button above. The problem is that when i do that, although the view successfully transitions, the settings view starts showing a back button too. Probably system navigation doesn’t make peace with this manual custom transition and so behaves erratically. How do i make it work? I want that when i click on back button on my profile update page the settings page open with the original system defined navigation bar intact.
Or, this whole problem could go away if I knew how to add a save button to system navigation bar?
Help me please.
Thanks.