There is a search form where, by the word, I look for all the similarities in the database. In an angular I list out.
The question is, is it possible to highlight the found coincidence for more convenient navigation, because the text can be many and finding an entry will be quite problematic.
HTML
<div class="form-group"> <input type="text" [(ngModel)]="text" class="form-control" placeholder="Search" name="text"> <button type="submit" class="btn btn-default" (click)="search()">Submit</button> <div *ngIf="SlidesFinded.length != 0"> <table class='table'> <thead> <tr> <th>Slide Id</th> <th> Presentation Id </th> <th>Slide Text</th> </tr> </thead> <tbody> <tr *ngFor="let Slide of SlidesFinded;"> <td>{{ Slide.idSlide }}</td> <td>NULL</td> <td> {{ Slide.textSlide }} </td> </tr> </tbody> Angular
export class TextSlidesComponent { public text: string; public SlidesFinded: any []; constructor(private http: HttpClient, @Inject('BASE_URL') baseUrl: string) {} search() { this.http.get<string[]>('/search/' + this.text).subscribe(result => { this.SlidesFinded = result; }, error => { console.log('an error occured!'); console.log(error); }); } } 