I am looking for a way to maintain the state of a checkbox even after navigating away from the page in an AngularJS and bootstrap environment. Currently, I find that my bound variable gets reset to false every time I reload the page when the controller runs. How can I ensure that my $scope.disableCheck variable stays updated?
Within my controller...
$scope.disableCheck = false;
$scope.removeCheck = function () {
$scope.disableCheck = !$scope.disableCheck;
}
And within my HTML...
<input class="notification-checkbox" type="checkbox" value="{{disableCheck}}" ng-click="removeCheck()" ng-clicked="{{disableCheck}}">