Use with ngModel

Use ngModel to bind the value of the select component to a variable in your component class. This way you can set a default selection, programatically update the selection, and keep track of the current selection.

Single select

Selected option: {{selectedCharacter}}
Component template
Component class

Multiple select

Selected options: {{selectedCharacters}}

Component template
Component class