Having an issue with displaying updated data on my UI. I am successfully pushing data into the database and an array using Angular 2-way binding. The data is being pushed as confirmed by the console, but it's not showing up on the user interface.
Controller
contacts.getall().then(function(response){
vm.people = response.data;
});
vm.toggleSidenav = function(){
$mdSidenav('left').open();
};
vm.saveit = function(info){
vm.people.push(vm.xyz);
contacts.add(vm.xyz);
console.log(vm.people);
My list
<md-list>
<md-list-item ng-repeat="person in vm.people | filter:vm.searchText | orderBy:'name'" ng-click="showDialog($event, person)">
<img alt="{{ person.name }}" ng-src="https://lh3.googleusercontent.com/-nR0PNFb3p4k/AAAAAAAAAAI/AAAAAAAAAAA/NVt2CqCrCis/photo.jpg" class="md-avatar" />
<p>{{ person.name }}</p>
<p class="phn">{{ person.phone }}</p>
<md-icon ng-click="vm.showConfirm($event, person)"aria-label="Open Chat" class="md-secondary md-hue-3" ng-class="">delete</md-icon>
</md-list-item>
</md-list>
For console
vm.people.push(vm.xyz);
contacts.add(vm.xyz);
console.log(vm.people);