clr-select.component.html 702 B

123456789101112131415161718
  1. <clr-select-container *ngIf="!link; else fieldWithLink">
  2. <label>{{ label }}</label>
  3. <select clrSelect [formControl]="control">
  4. <option *ngFor="let opt of options" [value]="opt.value">{{ opt.label }}</option>
  5. </select>
  6. </clr-select-container>
  7. <ng-template #fieldWithLink>
  8. <clr-select-container class="clr-input-group clr-input-group-sm">
  9. <select [formControl]="control" clrSelect #field>
  10. <option *ngFor="let opt of options" [value]="opt.value">{{ opt.label }}</option>
  11. </select>
  12. <div class="clr-input-group-append">
  13. <button class="btn btn-outline-primary" type="button" (click)="navigate(field)">{{ link.label || 'Details' }}</button>
  14. </div>
  15. </clr-select-container>
  16. </ng-template>