Pre-selected option and Custom idKey:
Controller:
vm.currentVideoGameCharacterOption = { characterId: 6, name: 'Sonic', weapon: 'Speed' }
HTML:
<search-select
ng-model="main.currentVideoGameCharacterOption"
options="main.videoGameCharacterOptions"
id-key="characterId"
label-keys="name"
placeholder-text="Select Character"
font-awesome-icon="fa-user">
</search-select>
Results in:
- Link
- Snake
- Peach
- Samus
- Pac-Man
- Sonic
- Infernape
- Mia
Selected Option: {"characterId":6,"name":"Sonic","weapon":"Speed","ss_index":5,"ss_display_name":"Sonic"}