如何在中心对齐离合器的标题上添加图标?

时间:2015-07-05 07:51:40

标签: css angularjs ionic-framework

如何添加" ion-ios-arrow-up"标题与中心对齐在我的离子应用程序中像我的概念下面? my concept

我的HTML模板:

<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>

之前谢谢

1 个答案:

答案 0 :(得分:4)

只需将标题绑定到$scope变量

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

并在您的控制器中

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

Codepen here。这是你想要的吗?