Angular multiple blocks on and off together

code looks like this,
https://stackblitz.com/edit/a...

what I want to do is to click and find all those with id, then turn their isOpen into true, and then switch with id

.

is there a way to do this?

ts

 cards = [{name:"div1",id: 1,isOpen: false},{name:"div2",id: 1 ,isOpen: false},{name:"div1",id: 2,isOpen: false},{name:"div2",id: 3 ,isOpen: false}];

  test(q){
    console.log(q)
        q.isOpen = !q.isOpen
  }

html

<div  *ngFor="let card of cards">
    <div class="open-close-container" (click)="test(card)">
      <div *ngIf="card.isOpen">test</div>
      <div *ngIf="!card.isOpen">shidsfsdfsdf<br>t</div>
    </div>
</div>
May.20,2022

you can't control everything with one tag. Because the tag is responsive, changing one of the components will change everything. It can be replaced by a flag array, or the object can be


A simpler way to write:

clipboard.png

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30e0d-2bd54.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30e0d-2bd54.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?