i will get data from function, in case this my code..
var urlServer = 'http://localhost:2205/inventoryApp/server/';
$scope.getReport = function() {
$http.get( urlServer + 'transaksi.php?action=getreport').success(function(data) {
$scope.reports = data;
// console.log($scope.reports.tanggal);
// if i run this console (inside function) the data is showing in console log
});
};
$scope.getReport();
console.log($scope.reports);
//this console log get undefined
and i get undefined in my console log..
thanks before :)
.error(). (Beware, both,.successand.errorare deprecated)console.log(data)in side your callback