try this
function postCtrl($scope, $http, $routeParams) {
$http.get('post.php?id=' + $routeParams.postId).success(function (data) {
$scope.post = data.data;
$scope.description = data.data.meta_description;
});
}
the response from the
$http
will be in
data
property, so you have use
data.data
, since you are using the
response
variable as
data
dont try to read the values outside the success event, since it will work independent of the flow of code execution..