title: highlight the search text in prime-ng autocomplete
body: <p>I am using the PrimeNG AutoComplete with angular 7.
                               In the auto complete I return a list of all the 
                            items that their 
                              description contains the search text.
                I would like to highlight matched words in each element of the shown list.</p>
  
  <pre><code>     &lt;p-autoComplete 
                      #autoComplete 
                       (onFocus)="autoComplete.handleDropdownClick()"
                      [suggestions]="results"
                      (completeMethod)="search($event)"
                      [multiple]="true"
                      field="Path"
                      (onSelect)="selectedValues($event)"
                      (onUnselect)="unSelectedValues($event)"
                      placeholder="Select Domain"
                      emptyMessage= {{noResult}}
                      [formControl]="dataModelControl"
                      &gt;
                &lt;ng-template let-value pTemplate="item"&gt;
                 &lt;div class="ui-helper-clearfix"&gt;
                 &lt;span [innerHTML]="value.Path | highlight : 
                 toHighlight"&gt;&lt;/span
                 &lt;/div&gt;  
                 &lt;/ng-template&gt;
             &lt;/p-autoComplete&gt;  
  </code></pre>
  
  <p>This is the definition of the <code>highlight</code> pipe:</p>
  
  <pre><code>@Pipe({ name: 'highlight ' })
  export class HighlightPipe implements PipeTransform {
      transform(text: string, search): string {  
            const pattern = search
            .replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&amp;")
            .split(' ')
              .filter(t =&gt; t.length &gt; 0)
             .join('|');
             const regex = new RegExp(pattern, 'gi');
  
              return search ? text.replace(regex, match =&gt; `&lt;b&gt;${match}&lt;/b&gt;`) : 
                   text;
                }
               }
              }  
              //in ts file
              search(event) {
  
        if (event.query) {
          this.toHighlight = event.query;
           this.results = this.data.filter(option =&gt; {
            return option.Path.toLowerCase().indexOf(event.query.toLowerCase()) 
           &gt;= 0
           });
            } else {
               this.results = this.data.slice();
              }
             }
  </code></pre>