title: Session Value doesnot retain for selection box
body: <p><a href="https://i.stack.imgur.com/0I66q.png" rel="nofollow noreferrer">Here is Picture For my issue</a></p>
  
  <p>I have populated the select box data dynamically and after setting in session those values must  be selected even the page reloads </p>
  
  <p>The code that populates the select box options is using ajax get method</p>
  
  <pre><code> else if (value.sourceType &gt; 0) {
          $('#SOURCE_TYPE').append('&lt;option data-ng-value="' + 
          value.sourceName +'"&gt;'+ value.sourceName + '&lt;/option&gt;');
   }
  </code></pre>
  
  <p>1.The selected session value should place in the selection box </p>
  
  <p><strong>Script</strong></p>
  
  <pre><code>var app = angular.module("app", ['ngMessages']);
  app.controller("quotationController",
    function($scope,$window) {
  
       $scope.quotation =[];
      $scope.contactId = null;
      $scope.quotation.drpContactType=$window.sessionStorage.getItem( 'drpContactType' );
      $scope.quotation.sourceType = $window.sessionStorage.getItem('sourceType');
  
      $scope.submit = function(){
        $window.sessionStorage.setItem('drpContactType',$scope.quotation.drpContactType);
        $window.sessionStorage.setItem('sourceType', $scope.quotation.sourceType);
  
      };
  
      fnendtmotoronload();
    });
   function fnendtmotoronload() {
  var status = true;
  var contactId = document.getElementById("CONTACT_TYPE").value;
  var CONTEXT_PATH = '&lt;%=request.getContextPath()%&gt;/';
  
  $.ajax({
    type : "GET",
    url : CONTEXT_PATH + "quotationDrop",
    data : contactId,
    contentType : 'application/json; charset=utf-8',
    dataType : 'json',
    success : function(result) {
      $.each(result, function(index, value) {
        if (value.contactType &gt; 0) {
          $('#CONTACT_TYPE').append(
              '&lt;option data-ng-value="' + value.contactName + '"&gt;'
                         + value.contactName + '&lt;/option&gt;');
        } else if (value.sourceType &gt; 0) {
          $('#SOURCE_TYPE').append(
              '&lt;option data-ng-value="' + value.sourceName + '"&gt;'
                  + value.sourceName + '&lt;/option&gt;');
        } 
      });
  
    }
  });
  return status; 
  }
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div class="col-sm-8"&gt;
  &lt;select ng-model="quotation.sourceType" ng-option="{{quotation.sourceType}}" required id="SOURCE_TYPE"
    class="form-control"&gt;
    &lt;!-- &lt;option selected="selected" value="0"&gt;--SELECT--&lt;/option&gt; --&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Data From DB</strong></p>
  
  <pre><code>{
    "contactType": 0,
    "contactActiveStatus": "\u0000",
    "createdBy": 0,
    "sourceType": 2,
    "accountCode": 0,
    "sourceName": "ADMIN",
    "newIcNo": 0,
    "businessRegNo": 0,
    "oldIcNo": 0,
    "quotationID": 0,
    "nameddriversno": 0,
    "namedage": 0,
    "extracoverageid": 0,
    "mpaid": 0
  </code></pre>
  
  <p>},</p>