I'm trying change https://akveo.github.io/blur-admin/ project. Its controllers are all in js format and I can't migrate them to typescript. So now I can't import any libraries to my controllers (I wanted to use socket.io-client to make a backend with java). I am trying this code
$http.get('http://localhost/aa.php').then(function (response) {
$scope.period_day = response;
}).catch(function (err) {
console.log(err);
});
but result is :
Object { data: null, status: -1, headers: headersGetter/<(), config: Object, statusText: "" }
But when I open this url in my browser it works fine. Now I just want to make http request to communicate my backend and I don't have any solution. (BlurAdmin project is developed with gulp)
$http.get('http://localhost/aa.php').then(function (response) { $scope.period_day = response.data; })is what you need. Therefore, read the documentation as this has nothing to do with TypeScript or JavaScript, it's elementary API use error.