I am hoping you can help. I have a ul with ng-repeat and I am trying to make some values hide when a checkbox is unticked. Essentially I have 2 different statuses in a json file: new and completed. I want completed ones to show when a checkbox is ticked and for them to hide when a checkbox is unticked. Thankyou. My code is below:
<div>
<input ng-model="$ctrl.query" placeholder="Search">
<input type="checkbox" ng-model="self.information">
<span> Show Completed </span>
</div>
<div class="container:fluid" id="list">
<ul>
<li ng-repeat="info in self.information |
filter: {'status': 'complete'}" ng-show="self.information">
<div class="row">
<!-- LI CONTENTS -->
</li>
</ul>
</div>
Aucun commentaire:
Enregistrer un commentaire