I am using primeng Multiselect dropdown in a form.
While clicking on the edit button I want to display the existed data in all the field. for Input text it is displaying as I am using [(ngModel)] and I have tried the same for Multiselect dropdown as well but it is not working.
so I am unable to bind the values of multiselect dropdown. I have tried using the for Loop but the values are not coming in the field.
<div *ngFor ="let role of resource.roles;">
{{role.name}}
<p-multiSelect
[options]="resourceRoles | dropdownToValuePipe"
placeholder="Select"
name = "roles"
id="roles"
[(ngModel)]="role.name"
ngModel
required
appendTo="body"
>
</p-multiSelect>
</div>