Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rakia/61b83a02126ff590bf13dcb6b55c8ab5 to your computer and use it in GitHub Desktop.
Save rakia/61b83a02126ff590bf13dcb6b55c8ab5 to your computer and use it in GitHub Desktop.
Angular: Logic to show real-time feedback to users when they type a name that already exists in the system
@Component({
selector: 'app-ecs-fieldset',
templateUrl: './ecs-fieldset.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class EcsFieldsetComponent {
formBuilder = inject(FormBuilder);
@Input() entity: EcsFieldset;
@Input() nameAlreadyExists: boolean | null = false;
@Output() checkIfNameExists = new EventEmitter<string>();
@Output() cancelEdit = new EventEmitter<void>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment