I have an array of objects like this: list = [{name: "name1", value: "true"}{name: "name2", value: "false"}{name: "name3", value: "true"}{name: "name4", value: "false"}]
What I want to do is to show inside a text area all objects names and if object.value is false underline or bold the line. And then to be able to write inside the text area to remove the underlined elements.
What I tried was:
<textarea *ngFor="let item of list" [ngClass]="{cssClass: item.value==false}">
</textarea>
-The problem here is that it shows an empty text area for each object AND
<div *ngFor="let item of list" [ngClass]="{cssClass: item.value==false}">
<textarea>
</textarea>
</div>
The problem here is that it creates a textarea per line, where the line is inside.
Thanks!!
Aucun commentaire:
Enregistrer un commentaire