javascript - add multiple classes on ng-click in ng-repeat to a selected row -
i'm trying add classes selected div in ng-repeat
. if this:
<div ng-class="{'selecte':isselected,'normal':'!isselected'}" ng-repeat="oneayah in ayahs" ng-click="selectparticular(oneayah)"> {{oneayah.text}} </div>
it changes class of divs within ng-repeat
. (isselect bool toggles every time div clicked.)
your second ngclass
param (normal
) checking string isselected
since quoted it, not bool:
ng-class="{'selecte':isselected,'normal':!isselected}" ^^^remove quotes around me
Comments
Post a Comment