gpt4 book ai didi

css - 如何在 ionic 中以居中对齐的方式在标题上添加图标?

转载 作者:太空宇宙 更新时间:2023-11-03 21:28:19 24 4
gpt4 key购买 nike

如何在我的 ionic 应用程序的标题上添加一个中心对齐的“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>

先谢谢

最佳答案

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

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

在你的 Controller 中

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

代码笔 here .这是您要找的吗?

关于css - 如何在 ionic 中以居中对齐的方式在标题上添加图标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31228246/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com