I have reference to input element:
@ViewChild("inputSearch", {
static: false
})
Template is:
<input tabindex="0" type="text" (keydown)="keydownInputSearch($event)" #inputSearch autocomplete="off" autofocus />
<div class="searchWrapperBtn" (click)="reset()"></div>
Where reset is:
public reset(): void {
this.inputSearch.nativeElement.value = "";
}
Why after reset() input value it is empty in input element but present in {{inputSearch.value}}
template-drivenandreactive-fromboth.