title: Highlight the search text - angular 2
body: <p>A messenger displays the search results based on the input given by the user. Need to highlight the word that is been searched, while displaying the result. 
  These are the html and component that is been used.</p>
  
  <p><strong>Component.html</strong></p>
  
  <pre><code> &lt;div *ngFor = "let result of resultArray"&gt;
  &lt;div&gt;Id : result.id &lt;/div&gt;
  &lt;div&gt;Summary : result.summary &lt;/div&gt;
  &lt;div&gt; Link : result.link &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Component.ts</strong></p>
  
  <pre><code>resultArray : any = [{"id":"1","summary":"These are the results for the searched text","link":"http://www.example.com"}]
  </code></pre>
  
  <p>This resultArray is fetched from hitting the backend service by sending the search text as input. Based on the search text, the result is fetched. Need to highlight the searched text, similar to google search. Please find the screenshot, </p>
  
  <p><a href="https://i.stack.imgur.com/9Y7uB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9Y7uB.png" alt="enter image description here"></a></p>
  
  <p>If I search for the word "member", the occurence of the word "member" gets highlighted. How to achieve the same using angular 2. Please suggest an idea on this.</p>