AngularJS tag for $http service is a core Angular service that facilitates communication with the remote HTTP servers via the browser's XMLHttpRequest object or via JSONP.

learn more… | top users | synonyms

2
votes
1answer
25 views

Angular js, weather api search city and using enter key

So the code allows me to show low and high temperature using the openweather api data. I can see the data perfectly, if i declare the value of the city in the input (ex: value ="houston") but i want ...
0
votes
0answers
17 views

View updating intermittently between page loads with an array change in angularjs

I have two components (contacts and notes) loading on the same page (from the main component) which both have simple http requests to add and delete information. They are only updating the view ...
1
vote
1answer
46 views

Asp.net MVC5 with Angular 2 configuration

I'm beginner in Angular 2. I'm creating Angular project using Angular CLI. I'm separately creating asp.net MVC Web api project. Using angular CLI to ng serve command start this service: localhost:...
0
votes
1answer
55 views

Angular $http.get request not running success or error functions

I am trying to make a get request to the nutritionix v1_1 api. When debugging I can see that the function is successfully called and the correct data is passed in. When the function hits the $http....
0
votes
2answers
27 views

Angular file upload to PHP backend

I'm developer and I try to learn some of AngularJs, now i try to do a form, and is necessary send a file from input[file] to php, but when I click the buttom the file is not sended to this php, Try ...
0
votes
2answers
40 views

Angular 2 http get not getting

I new to Angular 2 still learning i am trying to hit a url with a get call but the get dosen't seem to go through even in browser's network i cannot find that get url being called. The program is ...
0
votes
5answers
26 views

@RequestParam and angularjs $http.post data retrieval

I am trying to send an array arr=["xxx.yyy","zzz.vvv"] to spring endpoint like this: $http.post("url",arr) spring side: @PostMapping(value = "url") public Set<String> func(@RequestParam(...
0
votes
1answer
20 views

Angular - Having troubles receiving $http response from a factory

I have an angular factory doing some $http communication to the server and returning a string. However I get the Cannot read property 'then' of undefined error. I read here and here with similar ...
0
votes
2answers
38 views

Yet Another Asynchronous service returns Undefined

This is my service: (function () { 'use strict'; angular .module('app') .service('ClientsService', Service); function Service($http) { function getClients() { ...
0
votes
0answers
14 views

how to get multiple value from angularjs without pojo class in java?

How to get multiple value from angularjs without pojo class in java? angularjs <script> var myApp = angular.module('myApp', []); myApp.controller("myController", function ($scope, $http) { ...
1
vote
2answers
17 views

Angular http method changing the hour in datetime

I have the weirdest bug ever. I am talking to my API via angularjs and I try to update something by doing the following console.log('updated: ', event.startsAt); $http({ method: 'PUT', ...
8
votes
5answers
161 views

All data is gone on page reload. Is there any way to avoid that?

I have developed one dashboard application in angular js which is having search functionality and multiple views with lots of different data coming from that search functionality. Its single page ...
0
votes
4answers
56 views

how to call http call inside the for loop after success of before http call?

I want to call the api after completing the first is success.But in my code it call the api before the first one was completed for(var w=0;w<Ids.length;w++){ $scope.msgObject = { ...
2
votes
1answer
54 views

Get request is not fulfilling Angular-Express

I'm new to MEAN stack I want to have data fetch from express server (which I created with mongodb) when I click button, the function on button click was executed but request was not fulfilled, the ...
0
votes
3answers
71 views

Cancelling an angular service promise

I have a controller that performs a http request. This request can take anywhere between 2 seconds to 4 minutes to return some data . I have added a button, that users should click to cancel the ...
0
votes
1answer
44 views

Can not add bearer token in $resource header

I am not able to add bearer token in $resource service header for token based authentication. I used following code Factory return $resource(appSettings.serverPath + "/api/product/:id", null, { ...
1
vote
1answer
42 views

Promise.all processes the promises in a group of 6 at each time [duplicate]

I wanna make a bunch of (let's say 20) HTTP POST requests (in order to send information of an app to some HTTP servers) simultaneously. I am using http angular service to return a promise: function ...
1
vote
0answers
21 views

laravel response status -1 on mobile

I'm developing an applicaiton using laravel 5.2, and using angular in some places on the front end. I'm always getting -1 as the response status for $http requests, when testing with mobile. The same ...
0
votes
1answer
37 views

Why Sending Params in Post Works like GET

I am Trying to make an http post request to .php file at the server all what i do is making the request like this $http({ url: 'http://localhost/sebha/login.php', method: '...
1
vote
1answer
52 views

Angular 2 Http RetryWhen

I'm trying to use retryWhen in HTTP calls. It works perfectly when try to use like this: return this.http.get(`${environment.apiUrl}/track/${this.user.instance._id}/${this.currentPlayer.playlist.id}/...
-1
votes
1answer
42 views

Angular 2 services subscribed twice [duplicate]

I just start first project with Angular 2 and I've trouble with services. I've an http service called when submitting a form, but when I submit the form, the http request is executed twice. login....
0
votes
1answer
18 views

Can't post data from Angular to my nodejs api

When I try to post data from angular to my nodejs backend it doesn't work. [Backend] This is the function that catches the posted data. I tested it with postman and it worked. The console.log is just ...
0
votes
1answer
88 views

Angular 2 Spring Boot Login CORS Problems

I am trying to develop an application with Spring Boot for the back end and Angular 2 for the front end. Actually i have connection problems, when i accessing on the mvc login page from spring. I ...
3
votes
2answers
74 views

Accessing custom http response headers in angularjs

I am trying to access the header 'error-detail' as you can see in the browser network inspector (link above), the header gets returned. Server-wise I have also added the custom header to the 'Access-...
1
vote
1answer
58 views

How to use post method in AngularJS

I am fairly new to the Angular world, and i got some issues on using http post method. Please help me with this, thank you! To make my code look easier, I cut out the irrelevant stuff. Background: I ...
0
votes
2answers
55 views

Property 'update' does not exist on type 'Http'

I used Angular 2 Release and using Http from @angular/http. When I call the method update, generate this error: "Property 'update' does not exist on type 'Http'". On method Get and Post, Work ...
0
votes
1answer
77 views

Angular 2 observable-subscribe showing undefined

I am having the same challenge as was faces in the SO Post here I am getting undefined in the subscribe method in my component.ts, even though in my service i have the data. See codes below p....
5
votes
3answers
227 views

What is the HTTP promise object in AngularJS?

Although I am working with the HTTP promise object in AngularJS, I don't have a clear concept of what an HTTP promise object actually is and what the is difference between an HTTP promise object and a ...
1
vote
2answers
39 views

Angular JS $http promise object — How does it work?

All, I'm a beginner to Angular framework and have been reading $http service. I thought I understood Promise object in Angular JS until the below questions popped up my mind. Can you please help me ...
1
vote
2answers
43 views

How to serialize GET params with Nested Objects

I need to send in the following get request via Angular. Upon this request I have a rails server that takes in the param and returns JSON data. GET request needed: http://localhost:8080/clients....
0
votes
1answer
79 views

Angular 2 Webworkers Http Uncaught (in promise): not implemented

I've been stuck on an error that I'm not completely sure how to solve. My application is made in Angular2 and runs completely in a webworker largely based on this tutorial http://www.syntaxsuccess.com/...
1
vote
1answer
38 views

MVC model binding complex type that has a property of complex type collection with Angular JS

I am developing an Web application using Angular JS and ASP.NET MVC. But I am having a problem with model binding complex type. Please let me explain what I am doing first. I am uploading list of ...
0
votes
4answers
39 views

how to send data with ever $http post

I wanted to be able to send ipAddress for every $http.post() that's being sent to backend without manually mentioning it every time i send a post. How to do it in angular ? I found out there was $ajax....
0
votes
1answer
211 views

Angular $http request timeout not caught in error function on iOS 10 cordova

This is happening on Safari iOS 10 Cordova:6.3.1 Request using Angular $http, error function not called $http.get("http://10.255.255.1").then(function(res){ console.log("res: " + res); },function(...
0
votes
2answers
45 views

Angular 2 - http get return wrong object

I'm using @angular/http get to fetch data from server, here is my code : private _currentPT: any; public phongtroDetailChange = new Subject(); layPhongtro(id: number): Promise<any> { return ...
0
votes
1answer
101 views

Angularjs - cannot pass data from factory to controller

I'm new to angular and find myself stuck. I am trying to pass data from a factory to a controller and it returns undefined no matter what I have tried. Can anyone help? Ultimately I will need to ...
0
votes
2answers
79 views

Post And send object to MVC Web Api using Angular 2

I want to post data to my MMVC web api by using angular 2. But i don't know how to pass a object to my MVC API using angular. Any Help will be grateful. My Service Code in Angular 2 @Injectable() ...
0
votes
1answer
67 views

How to Handle multiple Ajax call calling same function?

Hi have 4 directives on the page, all directive require list of user. User List is stored in database which require hhtp request. As 4 directive are on the page at same time so 4 different ajax call ...
1
vote
0answers
70 views

Using Elasticsearch Scroll API with AngularJs

My Angular (v1.2.15) application needs to process a large (60k entries) index in Elasticsearch (v2.4). The index is too large to use traditional paging using from and size parameters in the ...
1
vote
2answers
26 views

Best separation of concerns approach for $http tasks between a controller and service

(working with Angular 1.5) Read many articles (some recent, some old / outdated) on the subject of $http requests, promises, and separation of concerns, and am currently experimenting with the ...
0
votes
1answer
42 views

AngularJS - resolve $http instead injecting value

I have a small tool, using AngularJS with the .value() recipe, which currently dumps almost the entire DB as JSON into this value. So I want to optimise the pages by loading some of this information ...
1
vote
1answer
28 views

Issue in binding service response with html component

I am using a slider component to represent my saved date ranges, I am facing the issue of the slider running before my service returns the HTTP response from backend, therefore I am facing the issue ...
0
votes
3answers
26 views

Using $http inside my own service - variable does not persist

I try to use a service to get some data from server, but I had a problem: even the console log out the length when I print 'myData.length', when I try to find length of '$scope.test' controller ...
1
vote
1answer
83 views

Angular 2 HTTP Headers not being added to request

I have the following http request in which I add the header to the request, however the request fails and when I look in the Network tab of the browser the request headers don't include the ...
0
votes
1answer
36 views

Angular: load environment properties before config/run

I'm developing a angular app, and this app has about a 10 configurable properties (depending on the environment and client). I had those properties in json config files, but this is really ...
1
vote
1answer
2k views

Angular 2 : No provider for ConnectionBackend

Get this "No provider for ConnectionBackend!" error when trying to use http with a promise. main.ts // ... tl;dr import a bunch of stuff platformBrowserDynamic().bootstrapModule(MyModule); ...
0
votes
1answer
98 views

Angular 2 HTTP service problems

I'm working with Angular 2.1.0 and am having problems trying to create an HTTP service to call a REST API provided by my server. I've looked around a lot using Google, and read many articles about how ...
3
votes
3answers
57 views

$http service cache when the method is post

when I set the $http to cache requests, I still see duplicate requests (with the same url and same data) sent to the server from browser network, $http.post(url, data, {cache:true} ).success(function(...
1
vote
1answer
42 views

AngularJS API call

Trying to make an API call. var app = angular.module("testApp", []); app.controller("mCtrl", ["$scope", "$http", function($scope, $http) { $http.jsonp("api.openweathermap.org/data/2.5/weather?q=...
1
vote
2answers
79 views

How to fire angular filter after async event

I have this simple angular filter based on an injected value. I need to initialize the value asyncrhonously, receiving the data from a $http response. The point is that even if the value has been set ...