'How to get the selected values in primeng multiselect?

How to get the selected option label and value in primeng multiselect (p-multiselect). Am using reactive form.



Solution 1:[1]

In html

<p-multiSelect [options]="cities" formControlName="selectedCities"></p-multiSelect>

In component

You can get value like this

this.your_form.controls['selectedCities'].value

Solution 2:[2]

<p-multiSelect [options]="cities" [(ngModel)]="selectedCities"></p-multiSelect>

You can get value like this

this.selectedCities

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Indrakumara
Solution 2 ajay