Created
June 24, 2017 11:30
-
-
Save Armenvardanyan95/e3a0efaefcf9ded60269544636aab8bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @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