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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -