how communicate backend without typescript in angular

151 Views Asked by At

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)

0

There are 0 best solutions below