Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: multiple flipping cards in ngFor loop

moulot priority asked 5 years ago


Hello, i would like to : hello, in a for loop how can i setup dynamically the identifiers (#cards1) and the toggle method (cards1.toggle). you first answered to me (in another question) that i should use a sub component with a private html. i still don't see how to dynamically add to each card its identifier (#cards1). is it possible with the "i = index" of the loop? same issue for the "cards1.toggle()" method can i have a small code if possible thank you


Arkadiusz Idzikowski staff commented 5 years ago

When you create sub component then the scope of every component should be private and you should be able to use the same template variable on every flipping cards. Did you encounter any problems when using this approach or do you need the unique identifier for different use case?



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: 8.8.1
  • Device: dell notebook
  • Browser: chrome
  • OS: windows 10
  • Provided sample code: No
  • Provided link: No