Skip to content
Edit this page

SiSelectOptionTemplateDirective documentation

import { SiSelectOptionTemplateDirective } from '@siemens/element-ng/select';

The directive allows to template/customize the option rendering in the dropdown. It is also used for rendering selected values in the input if no input template is provided. This requires using the SiSelectSimpleOptionsDirective to specify options as input.

Example:

<si-select [options]="[{ id: 'good', title: 'Good' }, { id: 'fair', title: 'Fair' }, { id: 'bad', title: 'Bad' }]" >
  <ng-template siSelectOptionTemplate let-option>{{ option.value | uppercase }}</ng-template>
</si-select>

Except where otherwise noted, content on this site is licensed under MIT License.