imsi imsi imsi imsi - 1 month ago 12
AngularJS Question

How set the back button on the left in ionic

i'm using ionic in my project how can set the back button on the left in the header here is my code :

<ion-header-bar class="bar-positive" align-title="left" >
<h1 class="title" style="text-align: center">More Info</h1>

<button ng-click="myGoBack()" class="button button-clear"> <i class="ion- chevron-left " ></i> Back </button>

</ion-header-bar>

<ion-view>
<ion-content >
<ion-list class="list-inset" style="margin-right: 1%;margin-right: 1%">
<ion-item style="margin-right: 1%;margin-right: 1%" class="item-text-wrap" ng-init="missionDetail.getAllFicheMissionDetails(missionId,desId);">
vehicule :{{payloadMissionDetail.vehicule}}
Mission :{{payloadMissionDetail.mission}}
Chau1 :{{payloadMissionDetail.ch}}
Chau2 :{{payloadMissionDetail.ch2}}
D├ępart :{{payloadMissionDetail.depart}}
</ion-item>
</ion-list>





Answer

You can use below code.

<ion-header-bar align-title="left" class="bar-positive">
  <div class="buttons">
<button class="button" ng-click="doSomething()">Left Button</button>
 </div>
 <h1 class="title">Title!</h1>
 <div class="buttons">
  <button class="button">Right Button</button>
 </div>
</ion-header-bar>


[@Documentation]: http://ionicframework.com/docs/api/directive/ionHeaderBar/