I have a filter on a few checkboxes that have a status.
When the status is 'successful' then the URL changes and adds the successful status and only the items with that status will be displayed.
I am curious if I can have my filter automatically toggle open when I enter the page if the checkbox is checked for 'successful'.
$scope.toggleFilters = true;
$scope.toggleSuccessful = true;
<p ng-click="toggleFilters=!toggleFilters">Toggle here</p>
<div ng-hide="toggleFilters>
<p ng-click="toggleSuccessful=!toggleSuccessful">
Successful </p>
<div ng-hide="toggleSuccessful">
<input id="successful" type="checkbox"
ng-change="filterChanged()"
ng-model="statusOptions.successful"/>
<label for="successful">successful</label>
</div>
</div>
Can somebody give me a hint?
Aucun commentaire:
Enregistrer un commentaire