One of my goals is to trigger a function when the user moves the mouse out of an input field.
<input #filter onmouseout="search(filter.value)">
The defined function looks like this:
search(term: string): void {
for(var i = 0; i < this.employeeFirstName.length; i ++) {
if(this.employeeFirstName[i] != term) {
this.employeeFirstName[i] = this.employeeFirstName[i + 1]
}
else {
this.employeeFirstName[i + 1] = this.employeeFirstName[i]
}
}
}
However, during testing, I encountered the following error message:
SCRIPT5009: 'search' is not defined
I am seeking clarification on why this error is occurring.