如何在Ionic 2网格中放置2角摇摆卡?

时间:2017-02-19 04:43:43

标签: angular ionic2

我最近在这里使用了来自Kapil Sachdeva的Angular 2 swing包的https://devdactic.com/ionic-2-tinder-cards/。我已经能够添加多个摆动组件,但我现在正试图让它们水平对齐。我尝试过使用离子2网格,但一直无法使用,因为它完全打破了组件。有关如何实现这一目标的任何见解?任何帮助将不胜感激。谢谢。

  <ion-col>
  <ion-row>
  <div swing-stack #myswing1 [stackConfig]="stackConfig1" (throwoutleft)="voteUp1($event)" (throwoutright)="voteUp1($event)" id="card-stack1"[style.zIndex]="-1000">
    <ion-card #mycards1 swing-card *ngFor="let c of cards1; trackBy:trackByCards1 let t=index;"[style.zIndex]="-1*t" [style.marginTop]="t === 0 ? '0px':'0px'"(tap)="openModal1(cards1)">
        
          <img *ngIf="c"[src]="c"id="image">
  
    </ion-card>
  </div>
  </ion-row>
  <ion-row>
   <div swing-stack #myswing2 [stackConfig]="stackConfig2" (throwoutleft)="voteUp2()" (throwoutright)="voteUp2()" id="card-stack"[style.zIndex]="-1000">
    <ion-card #mycards2 swing-card *ngFor="let p of cards2; trackBy:trackByCards2; let i=index;"[style.zIndex]="-1*i" [style.marginTop]="i === 0 ? '0px':'0px'"(tap)="openModal2(cards2)">
          <img *ngIf="p"[src]="p"id="image">
    </ion-card>
  </div>
  </ion-row>
  </ion-col>

0 个答案:

没有答案