Currently, I am a beginner in Angular 4 and I am working on learning how to search for data from a text box.
However, whenever I input special characters like "%" in my code, it triggers an error leading to a crash in my application. Is there any effective solution to resolve this issue specifically in Angular 4?
Below is the snippet of my code:
<div class="btn-group" role="group" aria-label="...">
<div class="input-group">
<div class="input-group-addon"> <i class="fa fa-search"></i></div>
<input class="form-control" [(ngModel)]="searchData" (keyup)="searchItemData(searchData)" type="text" placeholder="Search..."/>
</div>
</div>