Hello everyone,
I have the following code
<div ng-controller="controllerLibrary">
<ul class="module_list">
<li ng-repeat="module in modules">
<div class="span4 module_card">
<input id="{{module.title}}" type="checkbox" class="custom_checkbox"><label class="title" for="{{module.title}}">{{module.title}}</label>
<p>{{module.description}}</p>
<p><a class="btn btn_addlearning" ng-class="getCardButtonClass(module)" ng-click="addToMyLearning(module)">{{createButtonText(module)}}</a></p>
</div>
</li>
</ul>
</div>
and I would like to be able to update the css class of the div highlighted in orange (ie div class="span4 module_card") when its child checkbox is checked.
I have looked into the ng-class and angular expression.
My two questions would be:
- if you can actually access an html element and attribute from inside the angular expression.
- what would be the best approach to do this.
Thanks a lot for any help you could provide,
Cheers,
Xavier