1234567891011121314151617181920212223242526272829 |
- <clr-input-container *ngIf="!link; else fieldWithLink">
- <label [ngClass]="{ 'label-error': control.touched && control.invalid }">{{ label }}</label>
- <input clrInput type="text"
- [formControl]="control"
- [placeholder]="placeholder"
- (keyup)="handleKeyup($event.target.value)"
- spellcheck="false"
- >
- <clr-control-error>{{ getFirstFailureMsg() }}</clr-control-error>
- </clr-input-container>
- <ng-template #fieldWithLink>
- <clr-input-container>
- <label [ngClass]="{ 'label-error': control.touched && control.invalid }">{{ label }}</label>
- <input clrInput type="text"
- #field
- [formControl]="control"
- [placeholder]="placeholder"
- (keyup)="handleKeyup($event.target.value)"
- spellcheck="false"
- >
- <clr-control-error>{{ getFirstFailureMsg() }}</clr-control-error>
- </clr-input-container>
- <div class="input-group-append">
- <button class="btn btn-sm" type="button" [routerLink]="[ link.route, field.value ]">{{ link.label || 'Details' }}</button>
- </div>
- </ng-template>
|