I am new to this and i am trying to make a dummy contact list. I have printed the log which fetches the data from mongodb and i can see the correct data in browser console,but when i try to print it in html file it doesn't display.
Here are the snippets:
controller.js
var myApp = angular.module('myApp', []);
myApp.controller('AppCtrl', ['$scope', '$http', function($scope, $http){
$http.get('/contactlist').then(function(response){
console.log("I got the response");
console.log(response); //able to see correct data is fetched in the browser console
$scope.contactlist=response;
});
}])
Table where i try to print this data:
<tbody>
<tr ng-repeat="Contact in contactlist">
<td>{{Contact.name}}</td>
<td>{{Contact.email}}</td>
<td>{{Contact.number}}</td>
</tr>
</tbody>
Please explain what is going wrong.
Response shown in console: