I'm currently working with modals in an angular project and I have a requirement to focus on a specific field within the modal. This particular field is a part of a @component:
Autocomplete.html
<div #autocomplete>
<input #input required>
<ul class="list" *ngIf="isShow()">
<li>...</li>
<li>...</li>
</ul>
</div>
In addition,
Autocomplete.ts
@Component({
selector: 'autocomplete',
templateUrl: './autocomplete.html'
})
export class Autocomplete
{
}
This modal is triggered from another element within the same @component in the main view. When I click on the first input field, the modal is already fully rendered, rendering the ngAfterViewInit interface
ineffective.
Does anyone have any suggestions or ideas? Thank you