如何在离子中心对齐的标题上添加图标?
•浏览 1
How I can add an icon on header with center align in ionic?
如何在我的 ionic 应用程序中在标题上添加一个"ion-ios-arrow-up"图标,中心对齐,就像我下面的概念一样?
这是我的 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>
<ion-view title="{{title}}">
$scope.title ="Historical HPP <i class='ion-arrow-up-c'>";
之前谢谢
只需将标题绑定到 $scope 变量
<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>
<ion-view title="{{title}}">
$scope.title ="Historical HPP <i class='ion-arrow-up-c'>";
在你的控制器中
<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>
<ion-view title="{{title}}">
$scope.title ="Historical HPP <i class='ion-arrow-up-c'>";
在这里编写代码。这是你要找的吗?