Javascript ionicon存在于DOM中但不可见(宽度为0px)
如前所述,我想在我的一个页面中显示一个返回箭头,因为我没有使用navCtrl从app.component.ts返回此页面 因此,当我从app.component.ts进入这个页面时,我将一个标志设置为true,并且在我的模板中有一个条件,即显示一个col-1,其中有一个返回箭头,如果该标志设置为true,则单击该按钮将进入另一个页面。但这个箭头永远不会显示。我在DOM中的开发者控制台上进行了检查,col-1出现了,但箭头的宽度为0 以下是结果屏幕: 这是我的标题:Javascript ionicon存在于DOM中但不可见(宽度为0px),javascript,angular,ionic-framework,ionic3,ionicons,Javascript,Angular,Ionic Framework,Ionic3,Ionicons,如前所述,我想在我的一个页面中显示一个返回箭头,因为我没有使用navCtrl从app.component.ts返回此页面 因此,当我从app.component.ts进入这个页面时,我将一个标志设置为true,并且在我的模板中有一个条件,即显示一个col-1,其中有一个返回箭头,如果该标志设置为true,则单击该按钮将进入另一个页面。但这个箭头永远不会显示。我在DOM中的开发者控制台上进行了检查,col-1出现了,但箭头的宽度为0 以下是结果屏幕: 这是我的标题: <ion-header
<ion-header>
<ion-navbar>
<ion-row *ngIf="backArrow else elseBlock3">
<ion-col col-1>
<ion-buttons left>
<button ion-button large (click)="goToChats()"><ion-icon name="arrow_back" style="font-size:32px;"></ion-icon></button>
</ion-buttons>
</ion-col>
<ion-col col-10>
<ion-title style="margin-left:30%;margin-top:-3.5%;">
<img src="assets/imgs/masque.png" title="Masque Neemous" alt="Masque Neemous" style="margin-left: -2.5%;"><br />
Chat
</ion-title>
</ion-col>
<ion-col col-1>
<ion-buttons right>
<button ion-button large style="margin-left:-180%;margin-top:20%;" (click)="showMenu()"><ion-icon name="menu" style="font-size:32px;"></ion-icon></button>
</ion-buttons>
</ion-col>
</ion-row>
<ng-template #elseBlock3>
<ion-row>
<ion-col col-11>
<ion-title style="margin-left:30%;margin-top:-3.5%;">
<img src="assets/imgs/masque.png" title="Masque Neemous" alt="Masque Neemous" style="margin-left: -2.5%;"><br />
Chat
</ion-title>
</ion-col>
<ion-col col-1>
<ion-buttons right>
<button ion-button large style="margin-left:-180%;margin-top:20%;" (click)="showMenu()"><ion-icon name="menu" style="font-size:32px;"></ion-icon></button>
</ion-buttons>
</ion-col>
</ion-row>
</ng-template>
</ion-navbar>
</ion-header>
聊天
聊天
我在互联网上搜索了几个小时,但没有找到任何相关的线索,我看不出是什么原因造成的。任何帮助都将不胜感激
感谢所有阅读/回答此帖子的人。尝试将
箭头返回
更改为箭头返回
)这一天罗夫杀了我,谢谢你,很抱歉,别担心,我们都去过!谢谢你的理解