It's my angularjs code and i'm getting response in console But Can't display it..
{{user.email}}
var app = angular.module('myApp', []);
app.controller('apppCtrl', function($scope,$http) {
$scope.displayProfile=function(){
$http.get("../api/user_data.php")
.then(function(data){
$scope.user=data
})
// alert("Angularjs call function on page load");
}
});
Output
{"data":[{"id":"10","name":"Imran","last_name":"","email":"[email protected]",
"password":"pass","city":"","address":"[email protected]","gender":"","dob":"","img":""}],
"status":200,
"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],
"jsonpCallbackParam":"callback",
"url":"../api/user_data.php",
"headers":{"Accept":"application/json, text/plain, */*"}},"statusText":"OK"}