Issue
So when I used the $event with the onkeyup event and I want the value of the input filed to pass it to the filter Function it doesn't work
<div class="container mx-auto p-5">
<div class="searchBar">
<div class="field">
<p class="control has-icons-left">
<input #filterInput class="input" type="text" (keyup)="filterNotes($event.target.value)" placeholder="Filter">
<span class="icon is-small is-left">
<i class="fas fa-search"></i>
</span>
</p>
</div>
</div>
</div>
the class componet :
filterNotes(query: string) {
// some logic
}
Solution
simply add to the
"angularCompilerOptions":{
"strictDomEventtypes":false
}
in your tsconfig.json file
Answered By - aamir_rohan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.