I am new to using Angular and recently achieved success in making an Ajax call to the Random User Generator API to display a list of users. Now, I am aiming to create a detailed view when a user is clicked on. Within my HTML, I have implemented a function call: fetchInfoById(user.id.value). Below is the script for this function:
$scope.fetchInfoById = function(info_id) {
$http.get("https://randomuser.me/api/?id.value="+info_id)
//also tried: $http.get("https://randomuser.me/api/?id/value="+info_id)
.success(function(data) {
$scope.oneUserResult = data.results;
});
}
The current implementation does display a user detail view, however, it is not showing the selected user. Can anyone identify what I may be doing incorrectly?