p-dropdown doesn't show value from form or ng model

UI Components for Angular
Post Reply
rcosta
Posts: 9
Joined: 13 Dec 2016, 22:43

14 Nov 2018, 14:10

I'm getting a problem when I use the p-dropdown component binding a form. I have a Form Group with Form Controls that have our own values pre-loaded and the value of one of this controls should be showed at p-dropdown component. But it isn't visible when the page load.

I use the Dropdown look like:

Code: Select all

<p-dropdown [options]="vehicleTypes" placeholder="Vehicle Type" optionLabel="label" formControlName="vehicleType">
And my component have a Form Group that have a Form Control named vehicleType and with the value.

Code: Select all

{label: "TYPE 1", value: "1"}

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests