Hide left header button when showing back button

I have 2 buttons on header bar, left one shows number of points and at right its for side menu, here is my code. I want to hide the number of points button when its showing back button. currently it shows back button and points.

http://jsbin.com/yudasurojo/1/edit?html (code was not showing properly so I pasted in jsbin)

take a look here:

listen if data.showBack is set --> set a scope variable and hide your button with ngIf or ngShow

Thanks @bengtler I have used below method to do it, its now hiding it but the main header title is not center aligned, its a little right. Here is what I have done

angular.module('app').run(function ($rootScope, $location) { // Hide Points if Back Button is visible $rootScope.$on('$ionicView.beforeEnter', function (e, data) { $rootScope.hideCoins = !data.enableBack; }); });

and In template added ng-show="hideCoins"

<ion-side-menu-content> <!-- header bar --> <ion-nav-bar align-title="center" class="bar-dark"> <ion-nav-back-button></ion-nav-back-button> <!-- left button header --> <ion-nav-buttons ng-show="hideCoins" side="left"> <button ng-show="hideCoins" enable-menu-with-back-views="false" class="button button-clear" ui-sref="app.dashboard"> <i class="wf wf-coins"></i> 1.535 </button> </ion-nav-buttons> <!-- right button header --> <ion-nav-buttons side="right"> <button class="button button-icon button-clear ion-navicon" menu-toggle="right"> </button> </ion-nav-buttons> </ion-nav-bar> <!-- main content view --> <ion-nav-view animation="slide-left-right" name="main"></ion-nav-view> </ion-side-menu-content>

What to do so the Title must be in center