title: AngularJs select add option
body: <p>I work with angularjs and select options collection. If I added in html option tags all works good. But if i try added item from angular it is not working.</p>
  
  <p>My code:</p>
  
  <pre><code>&lt;div ng-controller="statisticsTableController"&gt;
    &lt;select ng-model="publishersdata" 
            ng-options="s for s in publishersdata"
            chosen option="publishersdata"&gt;
    &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and AngularJs code:</p>
  
  <pre><code>function statisticsTableController($scope, $http) {
    var publishersArray = [];
  
    $http.get('/api/getAllItems').success(function(data) {  
      angular.forEach(data, function(data) {
        publishersArray.push(data.Name);
      });
    });
  
    this.publishersdata = publishersArray;
    //...
  }
  </code></pre>
  
  <p>Why it is not working? And how to fix it?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>After changes:</p>
  
  <pre><code>function statisticsTableController($scope, $http) {
      var publishersArray = [];
  
      $http.get('/api/getAllItems')
          .success(function (data) {
              angular.forEach(data, function (data) {
                  publishersArray.push(data.Name);
              });
          });
  
      $scope.publishersdata = publishersArray;
      //...
  }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div ng-controller="statisticsTableController"&gt;
    &lt;select multiple 
            ng-model="publishersdata" 
            ng-options="s for s in publishersdata"
            chosen option="publishersdata"&gt;
    &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>It is not working properly </p>