Angular 1.5 not update ng-repeat

Viewed 884

I display a table through ng-repeat

     <div ng-app="spApp">
<div ng-controller="spListCtrl as MyList">
<table width="100%" cellpadding="10" cellspacing="2">
    <thead>

        <th>First Name</th>
        <th>Last Name</th>
        <th>Email</th>
        <th>CellPhone</th>
        <th>Update</th>
    </thead>
      <tbody>
        <tr ng-repeat="item in MyList.Contacts track by $index">

            <td class="align-center"><input type="text" ng-model="MyList.Contacts[$index].FirstName"> </input></td>
            <td class="align-center">{{MyList.Contacts[$index].Title}}</td>
            <td class="align-center">{{MyList.Contacts[$index].Email}}</td>
            <td class="align-center">{{MyList.Contacts[$index].CellPhone}}</td>
            <td class="align-center"><button ng-click="ShowNewForm(MyList.Contacts[$index])">Изменить</button></td>
        </tr>
    </tbody>
</table>

Loading through the service on the ajax data

spApp.controller('spListCtrl', function spListCtrl($scope,dataService){

var Contacts;
var promiseObj=dataService.getContacts();
promiseObj.then(function(value) {

Contacts=value; 
 });

I check in debugging, and data are assigned to come normal, but not displayed. What did not tried it, tell me what I'm doing wrong.

1 Answers
Related