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

1
vote
4answers
25 views

Can't assign object returned by service to $scope

I'm trying to assign data returned by service to $scope property. Somehow it doesn't work properly. The service method correctly get data via $http.get but then it is not assigned to $scope in the ...
0
votes
1answer
20 views

View No Longer Updating Immediately in Efforts to Clean Up Scope Soup

I've fallen victim to self-imposed $scope soup and am taking steps to correct this. I'm adopting some of the methods written about by Josh Carroll in his article here: http://www.technofattie.com/2014/...
1
vote
1answer
15 views

Same data is returned in AngularJS Promise Chaining

I want to make 3 API calls when my page is loaded to bring the necessary data. My application is in AngularJS#1.5.8. I am able to bring the data separately in service, but for some reason, in the ...
2
votes
1answer
44 views

AngularJS - Toaster not working in Controller

Service.js this.userLogin = function (username, password) { var dataBody = $.param({'username': username,'password': password}); return $http({ method: 'POST', ...
1
vote
1answer
26 views

Add document access denied

We've created an AngularJS 1 project and we can successfully use the search functionality using a POST. We added a controller for adding documents to an index but we keep getting the message ...
1
vote
0answers
56 views

Angularjs showing 500 internal server error on posting data to laravel routes

For some reason I'm getting a 500 interval server error when posting data from angular to laravel route. app.js var quora = angular.module("quora-app", ['q-controller-1', 'ngRoute', function($...
0
votes
1answer
12 views

using factory in the controller retrun undefind

i am trying to send value from my view to the controller using function inside ng-click , then use that value to pass it to my factory which goint to pull data from rest api link , but the value im ...
0
votes
1answer
38 views

How to login on a Domino server with angularjs?

I'd like to login to a Domino server from an angularjs webpage. The page itself resides in the database I want to authenticate with, so it's not really remote. This is my code: return $http({ ...
0
votes
0answers
55 views

Internal Server error 500 in Angular + Laravel

I am developing a application using laravel and angular js. Laravel is for the api and the view is also in a blade template which includes a ng-view element. I get this "internal server error 500" ...
-1
votes
1answer
46 views

How to check user token in Angular?

I generated token with JWT using node and angular, and can't check if user is authorized. Node: module.exports.authenticate = function(req, res) { var user = new User(req.body); User.findOne(...
1
vote
3answers
46 views

How to filter in ngTables

I am using ng-table to generate my table. but my data has two column, the first one is an object. My function in controller : $scope.allServers = function() { $http.get("/volazi/getServers")....
0
votes
0answers
34 views

AngularJS : Showing a spinner while during $http request

I put in place some routes with the $routeProvider. The place is that some templates need some time to load because of the $http requests. What I wanted to do is to display a spinner or a wait ...
0
votes
1answer
28 views

Angular JS $http POST not responding on success in ASP.NET MVC

I am developing an ASP.NET MVC Application. I am using Angular JS. Now what I am doing is posting data to server and getting json result from the server. But my problem now is, it sends data to server,...
0
votes
1answer
23 views

Submitting ASP.NET MVC CSRF token with $http in Angular JS

I am developing an ASP.NET MVC Web Application. I am using Angular JS. But I am having a problem with submitting post form to server because of CSRF validation. First of all, I am new to Angular JS. ...
5
votes
1answer
31 views

Encapsulating model in its own class for Angularjs app

I have 2 views. One is to list student in a table and the other is when you click on a student, it shows the details of the student. I have brought the student to it's own class in a separate file ...
1
vote
2answers
60 views

Angular $http service wait until data returned

I created this http service: (function () { "use strict"; angular.module("inspectionReview").factory("inspectionReviewServices", ["$http", "config", inspectionReviewServices]); function ...
0
votes
3answers
36 views

Able to access object returned by service, but accessing its properties gives undefined

I'm an angular beginner and I'm trying to set up a factory that gets data from my php back-end and updates the controller. Here is my basic code: factory app.factory('sessionStatus', ['$http', ...
0
votes
2answers
67 views

Angular: $http requests gives -1 status

A node.js server gives "This is a string". (writeHeader, write( string), end). When performing a $http request, I see that the node.js server is responding and sending the information back. In ...
2
votes
1answer
43 views

Angular post, put, delete returns 405

I am new to angular. I cant invoke POST, PUT and DELETE methods using angular (GETs working fine) I have a .NET WebApi server which all methods and all resources URLs works and tested using Advanced ...
1
vote
1answer
57 views

$http timing issues, AngularJS

Have two issues. I am trying to get a value from an $http response and populate a variable with it that should then update a couple DOM objects. Problem is that it seems to be having a timing issue ...
0
votes
3answers
96 views

angularjs multiple controllers same $http request cache

Working on a application that requires multiple components to be displayed on the same page that need data from the same api url. As per example I have two components, one is a breadcrumb one is the ...
2
votes
4answers
68 views

HTTP POST turns into OPTIONS AngularJS

I'm trying to submit a login form to a rest Api, translating my Jquery/Javascript code into AngularJS. I try to use $http service for send the request, but when I submit the form, the POST request ...
0
votes
0answers
24 views

Defining optional parameters in AngularJs http get

I have this code for HTTP get Method. I'm using currency as a parameter that is required but I would like to add optional parameters for time and date wich are also included in the API. How do I do ...
0
votes
4answers
70 views

AngularJS, how do I use a service to capture HTTP data and bind it to my controller?

I have an API call that's working great, but I'd like to use it on several controllers so I moved it to it's own service. I'm running into what looks like a classic Scope issue or a misunderstanding ...
2
votes
1answer
63 views

$state.go not working in single controller

everyone. I am having a strange problem...I have several states in my app, and they all seem to work except inside of one controller. I have posted the factory whose function I am trying to use, along ...
6
votes
3answers
313 views

Why do we prefer using $q in angular instead of $http

I am currently using $q service from angular to make API calls like this: var deferred = $q.defer(); $http.get(config.apiHost + details.url) .success(function (data) { deferred.resolve(...
1
vote
1answer
109 views

AngularJS 1.5 Components printed before gets the controller values

I've a parent view with a parent controller, with 2 children component, each one with his own controller. Something like this <section> // Main Controller <table-users listusers="...
1
vote
4answers
262 views

Cannot POST data to server through angularjs's $http module

I am coding using angular ajax. The client side code is: $http({ method: 'POST', url: '----/test.php', data: ({'txtDeviceID': 12345678}), headers: { 'Content-type': '...
0
votes
0answers
43 views

C Program Web API call from AngularJS $http

How I can give call to C Program Web API from AngularJS $http request? AngularJS $http part has been already done. But I m new to C Program. I want to know: How my $http URI and C program Web API ...
0
votes
1answer
78 views

node uploading file $http.post from angularjs has undefined req.body

I'm building a file upload functionality with my angularjs app that would upload a file to my node api that will ftp to a cdn server. Right now I'm stuck with just getting hte file. I tried using ...
0
votes
2answers
24 views

How to communicate AngularJS's $http routes and APIs developed in C Programming

I have made web application GUI using AngularJS, Bootstrap, HTML, CSS. Backend team are developing APIs in C Programing. So how my routes in $http request (sending from factory) will communicate to C ...
1
vote
3answers
352 views

How to skip angularjs interceptor for an HTTP request?

I have an angularjs app, in which I have an interceptor that adds the authorization token to the header of each request. However, somewhere in the application I need to use and external API where ...
1
vote
3answers
137 views

How to assign value returned by service's $http.get() to a variable in controller?

I have created the separate service for fetching data from server, but I want to assign the data that this service returns to variable in the controllers. in this case data is a simple JSON file. ...
-1
votes
1answer
118 views

Angularjs $http post promise [duplicate]

I try to use the promise respond from a $http.post, to get back the new ID of the record as integer and use it for the next $http.post. I used How do I return the response from an asynchronous call? ...
0
votes
0answers
29 views

Angularjs use $http post promise [duplicate]

I try to use the promise respond from a $http.post, to get back the new ID of the record as integer and use it for the next $http.post. My first code: var streckenId; var trackpunktId; var ...
1
vote
4answers
73 views

Angular async service

I'm trying to do an ajax call via $http service inside a custom service. Then I want to customize, inside my controller, the data received in the custom service. I wrap the customizing data function ...
0
votes
1answer
37 views

AngularJS add data array to $http request

I'm going to add some data in an array to $http service in angularjs. The way I add them to service is mentioned below (and it works properly) var inputValueArray = new Array($scope.formdata); I ...
0
votes
0answers
32 views

Unable to download JSON from CROS Domain request

I wanted to download json from below url http://www2.rsphinx.com/static/misc/cric_scores.json Server allowed cross domain requests also. But every time i am getting error of cross domain request I ...
1
vote
2answers
36 views

Why this angular $http.put parameter won't get passed?

I am facing a very weird case in my angularjs app. In a factory, the following code works properly: $http.put(apiBase + 'delete?id='+orderId); Which obviously connects to an api to perform a PUT ...
1
vote
1answer
166 views

Angularjs: Making another $http request inside a $http interceptor

I have a simple (half finished) http interceptor that appends a Bearer token (stored in $window.sessionsStorage) to the header so that REST API requests can be authenticated: function ...
0
votes
3answers
301 views

In AngularJS, my directive can't access $scope properties of the parent controler defined in $http

I'm creating a custom directive that inherits the scope of the parent controller. For the most part, I can access the directive's "scope" object that I set in the controller's "$scope" except for ...
1
vote
1answer
200 views

AngularJS ng-init does not work

When i go to list.html right after loading the page it doesnt show me the list. I need to go to form.html first and then back to list.html and then it gives me the list. When i had $http functions in ...
0
votes
2answers
61 views

Angular.js - $http.get - use cache from file

Is it possible to use a file (.js / .json) the angular.js cache for $http.get? We have an angular application, and we want to download some pages and view them offline. So, the idea is, before ...
1
vote
0answers
120 views

How to request a JSON with ajax on AngularJS?

How request a JSON with ajax on AngularJS? I have written my site on django. On get request to 0.0.0.0:8000/json/ ,it sends back a json.object At django, part views.py: def send_json(request, param)...
2
votes
1answer
619 views

Referencing multiple API calls in one Service (Angular)

I am accessing an API via Angular $http requests to gather information for different football teams. If I were to be only accessing one team, this would be fine - I would create a Service that made ...
0
votes
0answers
61 views

Woocomerce API + Angularjs with Tokens

I am trying to connect to woocommerce api & angularjs, I already created the token through the woocommerce settings, and use angular http.get. In the past i tried to send tokens through a header ...
0
votes
2answers
85 views

In AngularJS, $http doesn't change my select option tag data

I have an issue in AngularJS on using $http to fetch data from server. Here is my HTML <select ng-model="foo" ng-options="item as item.name for item in items"></select> Here is my ...
1
vote
1answer
47 views

Custom infinite scrolling trigger many times

I am new to angular was used to work with jquery. I set a directive which listen scrolling to trigger an http.get request when the user is almost on the bottom of the document. Everything works fine ...
1
vote
1answer
41 views

Use output from services to controllers

I want to result of my $http.get from my service to my controller. myserviceSample.js function messagesService($q,$http){ var messages; $http({ method: 'GET', url: 'http://api....
2
votes
4answers
430 views

Using the $q service with angular

I still can't understand the role of using the $q service, (what exactly will it add) if you want to create a service that need to call only one API via http , in this situation I don't know why ...