我是 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/