I would like fire the observable chipSelectionChanges, on init, in selecting a chip.
<mat-chip-list selectable multiple >
<mat-chip
*ngFor="let chipElement of chips"
[selected]="chipElement.selected"
>
{{ chipElement.name | titlecase }}
</mat-chip>
</mat-chip-list>
@ViewChild(MatChipList) matChipList!:MatChipList;
ngAfterViewInit() {
this.matChipList.chipSelectionChanges.subscribe(console.log);
}
If chipElement.selected = true, I would like fire chipSelectionChanges.
How can I make ?