Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Armenvardanyan95/e3a0efaefcf9ded60269544636aab8bf to your computer and use it in GitHub Desktop.
Save Armenvardanyan95/e3a0efaefcf9ded60269544636aab8bf to your computer and use it in GitHub Desktop.
@Component({
selector: 'some-component',
template: `
<p-dropDown [options]="users"></p-dropDown> // options is actually an input, a binding to a list of options for the dropdown to render
`
})
class SomeComponent {
users: SelectItem[] = [{value: 1, label: 'Armen Vardanyan'}, {value: 2, label: 'Also Armen Vardanyan'}];
/* SelectItem is an interface provided by PrimeNG, which has the following form: {label: string, value: any} */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment