gpt4 book ai didi

javascript - 在 ion-slide 中设置不同的 html 文件

转载 作者:行者123 更新时间:2023-11-30 12:08:24 26 4
gpt4 key购买 nike

我是 ionic 的新手,我必须在每个 ion-slide 中设置不同的 html 文件。

<ion-slide>
Here i have to set home.html file
<h3 class="text-center">slide2</h3>
</ion-slide>
<ion-slide>
Here i have to set city.html file
<h3 class="text-center">slide2</h3>
</ion-slide>
<ion-slide>
Here i have to set test.html file
<h3 class="text-center">slide2</h3>
</ion-slide>

最佳答案

您可以使用 ng-include 来做到这一点指示。 Working plunker .

<ion-view title="{{tab.name}}">
<ion-content class="has-header" padding="true">
<ion-slide-box>
<ion-slide>
<ng-include src="'home.html'"></ng-include>
<h3 class="text-center">slide2</h3>
</ion-slide>
<ion-slide>
<ng-include src="'city.html'"></ng-include>
<h3 class="text-center">slide2</h3>
</ion-slide>
<ion-slide>
<ng-include src="'test.html'"></ng-include>
<h3 class="text-center">slide2</h3>
</ion-slide>
</ion-slide-box>
</ion-content>
</ion-view>

关于javascript - 在 ion-slide 中设置不同的 html 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34543111/

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