user3077416
user3077416

Reputation: 271

How I can add an icon on header with center align in ionic?

How I can add an "ion-ios-arrow-up" icon on header with center align in my ionic app like my concept below? my concept

Its my HTML template:

<ion-view cache-view="false" view-title="Historical HPP">
    <ion-nav-bar class="nav-title-slide-ios7 bar-assertive" ng-click="click()"></ion-nav-bar> 
 <ion-content class="has-header"> 
Hello
  </ion-content>
</ion-view>

Thanks before

Upvotes: 0

Views: 2429

Answers (1)

novalain
novalain

Reputation: 2209

Just bind the title to the $scope variable

<ion-view title="{{title}}">

and in your controller

$scope.title = "Historical HPP <i class='ion-arrow-up-c'></i>";

Codepen here. Is this what your looking for?

Upvotes: 4

Related Questions