how to apply filter option for following html code that will check and display on real time input given.
 <div class="block-parent">
  <input type="text" name="search" class="search">
  <div class="answer block1" style="color: white; background-color: rgb(98, 128, 145);">Nick</div>
  <div class="answer block1" style="color: black; background-color: rgb(114, 139, 137);">Sam</div>
  <div class="answer block1" style="color: white; background-color: rgb(123, 138, 115);">John</div>
 </div>
Example: When user type nick on search box then only <div class="answer block1" style="color: white; background-color: rgb(98, 128, 145);">Nick</div> is need to show & other two div is need to hide  .Please anyone can suggest a good method .
ie creating a search result like https://docs.angularjs.org/api/ng/filter/filter
 
     
     
     
     
     
    