Skip to content

ion-item-sliding not working with *ngFor dynamic list #9095

@DonShirley

Description

@DonShirley

Short description of the problem:

See code below. Without *ngFor directive the sliding motion to show buttons is working. When using the *ngFor it is not working anymore.

What behavior are you expecting?

Steps to reproduce:

  1. run
<ion-content>
   <ion-list>
      <ion-item-divider light>
         24.03.2016
      </ion-item-divider>
      <ion-item-sliding *ngFor="let ticket of ticket_service.tickets_aktuell" #slidingItem>
         <ion-item>
            <p>{{ticket.Name}}</p>
            <p>{{ticket.Street}}, {{ticket.Postalcode}} {{ticket.City}}</p>
         </ion-item>
         <ion-item-options side="right" icon-left>
            <button ion-button color="secondary" (click)="ticket_bearbeiten(ticket)">
               <ion-icon name="construct"></ion-icon>
               Bearbeiten
            </button>
            <button ion-button default (click)="ticket_details(ticket)">
               <ion-icon name="paper"></ion-icon>
               Details
            </button>
         </ion-item-options>
      </ion-item-sliding>
   </ion-list>
</ion-content>

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Which Ionic Version? 1.x or 2.x
2.1.4

Run ionic info from terminal/cmd prompt: (paste output below)


Your system information:

You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.3.1

Gulp version: CLI version 3.9.1
Gulp local:
Ionic CLI Version: 2.1.4
Ionic App Lib Version: 2.1.2
OS:
Node Version: v6.9.1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions