Save the state of a variable in Angularjs
<p>I am creating a user checklist, where I want to save his progess everytime he checks and closes/opens the application.</p>

<p>Here is what i have done so far:</p>

<p><strong>HTML</strong></p>

<pre><code>      &lt;i class="white-circle" ng-class="{'green-circle': isToggled1 === true}" ng-click="isToggled1 = !isToggled1"&gt;1&lt;/i&gt;
      &lt;i class="white-circle" ng-class="{'green-circle': isToggled2 === true}" ng-click="isToggled2 = !isToggled2"&gt;2&lt;/i&gt;
      &lt;i class="white-circle" ng-class="{'green-circle': isToggled3 === true}" ng-click="isToggled3 = !isToggled3"&gt;3&lt;/i&gt;
</code></pre>

<p><strong>JS</strong></p>

<pre><code>angular.module('starter.rencontreController', ['ngSanitize', 

'LocalStorageModule'])
.directive('toggleClass', function() {
  return {
    restrict: 'A',
    link: function(scope, element, attrs) {
      element.on('click', function() {
        element.toggleClass(attrs.toggleClass);
      });
    }
  }

})
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider

    .state('rencontre', {
      url: '/rencontre',
      templateUrl: 'templates/rencontre.html',
      controller: 'rencontreController'
    });
})

.config(function (localStorageServiceProvider) {
  localStorageServiceProvider
    .setStorageType('sessionStorage');
})

.controller('rencontreController', function ($scope, localStorageService){

    $scope.isToggled1 = localStorageService.get('isToggled1') ? localStorageService.get('isToggled1') : false;


  scope.$watch('isToggled1', function(newValue, oldValue) {
      localStorageService.set('isToggled1', newValue);
  });
</code></pre>

<p>The problem is I do not know how to store "isToggled" variables.
Any help will be appreciated.</p>