title: Local storage get value angular and pass to input
body: <p>Here in this function, I pass values name, surname, email to local storage. I want to use these values for my input form so that user would not have to enter these values after using for once. How do I take each of value to print in my view HTML?</p>
  
  <pre><code>function submit() {  
      if($rootScope.name!=null)    {
          var JSONObject = {
               "name":$rootScope.name,
               "surname":$rootScope.surname,
               "email":$rootScope.email,
               "review":$rootScope.review
              }
          var temp={
              "name":$rootScope.name,
               "surname":$rootScope.surname,
               "email":$rootScope.email
          }
          $scope.localArray.push(temp);
          localStorageService.set("wimmtkey", $scope.localArray);
          var obtained_array = localStorageService.get("wimmtkey"); 
  
          var Results = UniversalService.PostReview(JSON.stringify(JSONObject));
          }
      }
  </code></pre>
  
  <p>This is my view.html</p>
  
  <pre><code>&lt;form name="form" ng-submit="vm.submit()" role="form"&gt;
          &lt;div &gt;
              &lt;div&gt;
                  &lt;div class="form-group"&gt;
                      &lt;label for="name"&gt;Name&lt;/label&gt;
                      &lt;input type="text" name="text" id="name" class="form-control" ng-model="vm.name" placeholder="Enter name here" required /&gt;
                      &lt;span ng-show="form.name.$dirty &amp;&amp; form.name.$error.required" class="help-block"&gt;Name is required&lt;/span&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div&gt;
                  &lt;div class="form-group"&gt;
                      &lt;label for="surname"&gt;Surname&lt;/label&gt;
                      &lt;input type="text" name="text" id="surname" class="form-control" ng-model="vm.surname" placeholder="Enter surname here" required /&gt;
                      &lt;span ng-show="form.surname.$dirty &amp;&amp; form.surname.$error.required" class="help-block"&gt;Surname is required&lt;/span&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
               &lt;div&gt;
                  &lt;div class="form-group"&gt;
                      &lt;label for="email"&gt;Email&lt;/label&gt;
                      &lt;input type="text" name="email" id="email" class="form-control" ng-model="vm.email" placeholder="Enter email here" required /&gt;
                      &lt;span ng-show="form.email.$dirty &amp;&amp; form.email.$error.required" class="help-block"&gt;Email is required&lt;/span&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div&gt;
                  &lt;div class="form-group"&gt;
                      &lt;label for="review"&gt;Review&lt;/label&gt;
                      &lt;input type="text" name="text" id="review" class="form-control" ng-model="vm.review" placeholder="Enter review here" required /&gt;
                      &lt;span ng-show="form.review.$dirty &amp;&amp; form.review.$error.required" class="help-block"&gt;Review is required&lt;/span&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
             &lt;div class="form-actions"&gt;
                  &lt;button id="submit" type="submit" onclick="passInfo()" class="btn btn-primary"&gt;Submit&lt;/button&gt;
                  &lt;label style="display:none" id="label"&gt;&lt;font color="white"&gt;Succesfully added!  
  
                  &lt;a onclick="refresh()" href="../ang/#!/review"&gt;Add new review&lt;/a&gt;&lt;/label&gt; or 
                  &lt;a href="../ang/#!/"&gt;View reviews&lt;/a&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
      &lt;/form&gt;
  </code></pre>