I have p-dropdown for showing countries. I bind the select options correctly there it works fine but I need to set default selected where selected is true while update the data
<p-dropdown name="category" [options]="Category" [(ngModel)]="category >
</p-dropdown>
0:{disabled: false, group: null, selected: false, text: 'Laptop', value: '2'}
1:{disabled: false, group: null, selected: true, text:
First of all, you may use template driven forms instead reactive forms.
Following your showcase, you can do the following:
It will work but it is not the best way to it... as I mentioned before, use template driven form instead.
Documentation: Angular Forms