title: cant display values of array
body: <p>I have a textbox which display the code of users</p>
  
  <pre><code>&lt;label class="control-label"&gt;USER CODE:&lt;/label&gt;
  &lt;input placeholder="Enter a User Code" type="text" class="form-control" ng-model="user.userCode"/&gt;
  </code></pre>
  
  <p>On a show button it calls an api which fetches the product code assigned to particular user.</p>
  
  <pre><code>&lt;button type="button" class="btn btn-info"&gt;&lt;i class="fa fa-hand-o-up" ng-click="getAssignedProducts(user.userCode)"&gt;&lt;/i&gt;Show&lt;/button&gt;
  </code></pre>
  
  <p>The product code is displayed in the table:-</p>
  
  <pre><code>&lt;label style="text-align:center;"&gt;Mapped Products:&lt;/label&gt;
  &lt;table cellpadding="0" cellspacing="0" style="margin:auto;"&gt;
    &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Product Code&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr ng-repeat="row in assignedProduct track by $index"&gt;
          &lt;td&gt;{{row}}{{$last ? '' : ', '}}&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>My api code is:-</p>
  
  <pre><code>function getAssignedProducts(userCode) {
      return $http({
          method: 'GET',
          url: '/api/user/assignedProduct?userCode=' + userCode
      });
  }
  </code></pre>
  
  <p>My directive code:-</p>
  
  <pre><code>scope.getAssignedProduct = function(userCode) {
      ApiServices.getAssignedProduct(userCode).then(
          function(response) {
              scope.assignedProduct = response.data;
          },
          function(err) {
              // Handle error here
              console.log('Error' + JSON.stringify(err.data));
          });
  }
  </code></pre>
  
  <p>Here, assignedProduct is an array in backend which stores string values.</p>
  
  <p>What my issue is, the api is calling correctly but the data is not displaying in table.I think I am not displaying data correctly in directive. Can anyone tell me where is my mistake. </p>