title: how to set the option of select dynamically via angularjs?
body: <p>I found many question regarding to this topic and solutions to can not help; I have select like</p>
  
  <pre><code>   &lt;select type="text" id="role" name="role" ng-model="role" ng-options="rol as rol.title for rol in rolelist" class="form-control" required&gt;
          &lt;option value=""&gt;Select Role&lt;/option&gt;
      &lt;/select&gt;
      &lt;p class="ng-invalid"  ng-show="addForm.role.$error.required"&gt;Role need to selected&lt;/p&gt;
  </code></pre>
  
  <p>and want to set the value of role model via angular js; i have done like this;</p>
  
  <pre><code> $scope.role=$json.data.role_id;
  </code></pre>
  
  <p>didnot work for me?</p>