I am currently facing an issue with displaying user information retrieved from my database using AngularJS. The code snippet below shows how I am trying to get the user data:
angular.module('listController',[])
.controller('listCtrl', function($scope, $http){
$scope.loading = true;
$http.get('/api/list').then(function(data){
user = data.data.users;
console.log(user);
}), function(error){
console.log(error);
}
})
Although I can successfully retrieve the user data, I am struggling to display it on the screen. Is there a way to use ng-repeat to achieve this? I would appreciate any suggestions or ideas on how to solve this problem.