title: Dynamic Option for chosen in angularJs
body: <p>I am using chosen in angularjs.</p>
  
  <p>I created a select as follows. and I need to changes the options dynamically.</p>
  
  <pre><code>&lt;select class="sel-bx" chosen dataload="aListOfSampleIds.length" multiple selecteditm="sampleIdList" ng-model="sampleIdList" 
          ng-options="sampleIds.sample_id as sampleIds.sample_id
          for sampleIds in aListOfSampleIds | unique:'sample_id'" data-placeholder = " " &gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>In the directive i wrote </p>
  
  <pre><code> $(".chosen-container").unbind('keyup').bind('keyup',function(e) {
                      //console.log('sfddf');
                      var searchStr = $('.chosen-container .search-field input').val();
                      console.log(searchStr);
                      if (searchStr.length &gt; 2) {
                          console.log("Hi");
                          //Need to change the options in the list here
                          $rootScope.aListOfSampleIds =['sample_id','llll'];
                      }
                  });
  </code></pre>
  
  <p>How can I do this.</p>