本机脚本轮播:无法通过索引找到轮播(网格)子项

时间:2021-04-29 16:18:03

标签: android node.js angular nativescript carousel

我想用 nativescript-carousel 视图插件创建一个动态轮播。

我使用以下代码:

   <Carousel #carousel 
    [items]="fiches" 
    debug="true" 
    height="100%" 
    width="100%" 
    color="red" 
    backgroundColor="red" 
    indicatorOffset="0, -30" 
    indicatorColor="#fff000" 
    finite="true" 
    bounce="false" 
    showIndicator="true"
    verticalAlignment="top" 
    android:indicatorAnimation="DROP"
  >
    <CarouselItem 
      height="red" 
      backgroundColor="red" 
      *ngFor="let item of fiches; let id=index"
      [id]="'slide '+id" 
      verticalAlignment="center"
    >
      <GridLayout rows="*" cols="*, *">
        <WebView height="100%" width="100%" 
          [src]="item.content" (loaded)="onWvloaded($event)">
        </WebView>
      </GridLayout>
    </CarouselItem>
  </Carousel>

第二张幻灯片已创建,但我看不到内容: want i get

0 个答案:

没有答案