im using list box in reactive forms in angular. Im able to get the multiple selected valules while adding. while editing need to populate the value in the list box, so that user can select different values. i cant use ngModel in reactive forms as its deprecated. Any idea on how to populate value on loading. it will have multiple values which need to displayed as selected on loading.
im using angular 13.0 and primeng "13.0.3". Here is my HTML
<p-listbox [options]="contacts" optionLabel="contact_role_name"
[listStyle]="{'max-height':'75px', 'max-width':'300px'}" (onChange)="getSelectedRoles($event)"
[multiple]=multi formControlName="roleName">
</p-listbox>
Any help would be appreciated.
Angular PrimeNG ListBox populating selected values on loading
-
- Information
-
Who is online
Users browsing this forum: No registered users and 20 guests