TestApp.controller('MainCtrl', ['$scope','$http', function ($scope,$http) {
$http.post('test.php')
.success(function(data){
console.log(data)
})
.error(function(data,status){
console.log('error');
})
}])
<?php
echo false;
TestApp.controller('MainCtrl', ['$scope','$http', function ($scope,$http) {
$http.post('test.php')
.success(function(data){
console.log(data.message)
})
.error(function(data,status){
console.log('error');
})
}])
<?php
echo '{"message":false}';
?>
TestApp.controller('MainCtrl', ['$scope','$http', function ($scope,$http) {
$http.post('test.php')
.success(function(data){
console.log(data)
})
.error(function(data,status){
console.log('error');
})
}])
<?php
echo 'false';
?>