Answer the question
In order to leave comments, you need to log in
Why does splice only remove the last component?
<div class="common-goal-tags-container">
<p #target2 class="table-divider-title">GOAL'S TAGS</p>
<div class="tags-container">
<div class="goal-tag input-tag" *ngFor="let t of tags; let i = index">
<ion-input (focusin)="utils.scrollToTarget(target2)" class="tag-input" (input)="tagChanged($event, i)" value="{{t}}"></ion-input>
<div (click)="tags.splice(i, 1)" class="delete-tag">X</div>
</div>
<div *ngIf="tags.length<5" class="add-goal-tag goal-tag input-tag" (click)="onAddTag()">
<ion-icon name="add"></ion-icon>
</div>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question