import { Component } from '@angular/core';
import { AutoFocusDirective } from '@yelon/abc/auto-focus';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzInputModule } from 'ng-zorro-antd/input';
@Component({
selector: 'components-auto-focus-simple',
template: `
<button nz-button (click)="showInput = !showInput">Toggle Input</button>
@if (showInput) {
<div class="mt-md">
<input nz-input auto-focus />
</div>
}
`,
standalone: true,
imports: [NzButtonModule, NzInputModule, AutoFocusDirective]
})
export class ComponentsAutoFocusSimpleComponent {
showInput = false;
}