0

I need to highlight the div of searched item. what ever the item searched the class will change to the particular div.

note: not the text

HTML:

<input type="text" ng-model="mod">


<div ng-repeat="item in items | filter: mod" ng-class="highlight">

     {{item}}

</div>

Can anyone suggest me a way to this thanks in advance

Nattu Raju
  • 310
  • 1
  • 2
  • 11

1 Answers1

0

Try this:

 <input type="text" ng-model="mod">


    <div ng-repeat="item in items | filter: mod" ng-class="{highlight:mod}">

         {{item}}

    </div>
Amit Ramoliya
  • 392
  • 1
  • 9