Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
74 views

So I have some code in a service that looks like this: getData(params) { // ... config, url return this.$http.get(url, config) .then(result => {...}) .catch((e) => {...})...
knee pain's user avatar
  • 620
1 vote
2 answers
105 views

I have a problem with accessing data from Service in Controller. Here`s my Service's file code: import {IHttpService} from 'Angular'; export class MyService { public static $inject = ['$http']; ...
Sem Horse's user avatar
0 votes
0 answers
94 views

Hi thanks in advance for the help. We're running a mobile web app that has been working fine on all browsers when it originally went live earlier this year. About the app: Running on IIS 8.5. ...
aduexjr's user avatar
  • 121
0 votes
2 answers
210 views

On page load, I get data from a database and place it in $scope.x. In my network tab, I get the list from my database but it is not loaded to the variable which I will soon be needing in a dropdown ...
stack questions's user avatar
2 votes
1 answer
6k views

I have a Https url and want to send request to get data from that URL , scenario 1: from my browser If I hit the Url i get the response whereas from my Angularjs App I get always an error 401 , but ...
Kumail Hussain's user avatar
1 vote
1 answer
2k views

I have created a service that deal with get and post request in angularJS but the problem is in my controller I couldn't catch the error call back however success callback is working good: app.js ...
Kumail Hussain's user avatar
0 votes
1 answer
145 views

I get data from the database using the $http service and get() method. The database contains 100 records in the form of an array of objects, but I only need to get the first 10 records, not all 100. ...
DmtGurov's user avatar
0 votes
1 answer
3k views

I am currently making a call to my api which returns an image as an image/jpeg. My issue is the when calling the url through javascript angular .factory resource I am getting my array buffer as empty {...
paul590's user avatar
  • 1,445
0 votes
2 answers
88 views

I have two controllers one nested inside another. ParentController has one object which I am using in ChildController as it is directly available in child. Now, in child, I am calling $http service ...
Piyush Patel's user avatar
  • 1,781
3 votes
1 answer
1k views

How can I get $http readyState, use like this: var request, interval; request = $http .post('/user/info', {...}) .success(...); interval = setInterval(function(){ if(request.readyState < 3)...
Turar Abu's user avatar
  • 368
2 votes
1 answer
7k views

I'm trying to use AngularJS within an POST request, but I cannot use $scope within the event. Thats my code (for demonstration purpose I just add status within the Angular construct): myApp....
flor1an's user avatar
  • 990
1 vote
2 answers
764 views

** ANGULAR 1.X ** Hello everyone! I need help with making this $http.get function asynchronous, as you can see from the code, my current temp solution is to setInterval the displayData scope. Which ...
Abdul Amoud's user avatar
-1 votes
1 answer
2k views

I've seen different examples of Restful API facotires error handling and this is a bit confusing. Here is two examples: A angular.module('app').controller('userCtrl', function($scope, User) { $...
Jis0's user avatar
  • 91
0 votes
0 answers
98 views

I am using angular js and angular js ui-route. I am trying to pass a registration POST form variables from a view passed to angular and send to PHP using $http.POST. Here is my index.html &...
cleem's user avatar
  • 75
1 vote
0 answers
59 views

Can anyone help me understand why my authInterceptor, upon a 401 or 500 error, redirects OK (using $location) but the page seems to hang aftewards, and the response does not seem completed? Does ...
twk's user avatar
  • 1,851
0 votes
0 answers
155 views

Who can tell me at least 5 differences AngularJS standard $http and NgResource? Expect that NgResourse is better for RESTfull Api.I searched for this but didn't find a good answer:(
rebilliony's user avatar
0 votes
1 answer
1k views

I'm developing an Electron app using NodeJS and AngularJS to download mp3 files from a web service and save them to a specific folder. To accomplish this, i'm using AngularJS $http.get() to download ...
Ricky's user avatar
  • 3,122
0 votes
1 answer
1k views

I am trying to create a call from my Angular 4 application to my server that is asp.net web api, first of all I enabled cors in my server and it seems working, now when I am trying to call I am ...
Zakk's user avatar
  • 766
0 votes
1 answer
1k views

I'm uploading some elements to S3. I'm using the same example inside of this link: JsFiddle myApp.controller('myCtrl', ['$scope', 'fileUpload', function($scope, fileUpload){ $scope.uploadFile = ...
Chuck Villavicencio's user avatar
0 votes
1 answer
541 views

I am working on a system that currently requires me to load all items from an API. The API is built with pagination feature in it. I keep calling the API a number of times and $http.get cursing the ...
Ezell Buoee's user avatar
0 votes
0 answers
226 views

I'm trying to improve my app performance on mobile devices with laggy networks. The first step was add "global" timeout for all http request, I used simple request interceptor for that - request(...
luacassus's user avatar
  • 6,750
5 votes
3 answers
5k views

First of all, I am not good at angularjs. While I've been studying about $q, I faced a weird problem. When I use $q.all, I put $http in regular sequence expecting to get results in same order, but ...
Canet Robern's user avatar
  • 1,069
0 votes
0 answers
70 views

I checked the mentioned post, first it has nothing to do with AngularJS, second, the answer to that post is: And NO, you can't use JSONP for fetching html data. How come my post is a duplicate, than ...
Slava's user avatar
  • 6,720
0 votes
2 answers
1k views

If i have one API server then the API is send ajax data with JSON format : {"status":304,"message":"Cannot delete data where PK is empty or > 1"} how to AngularJS $http post call the status and ...
ikwijaya's user avatar
1 vote
1 answer
1k views

I'm new to angularjs, and I know there are a lot of questions regarding this error, Unfortunately I couldn't find an answer that fits my problem in any of them. I've got a factory that holds all the ...
Dor Golan's user avatar
  • 179
3 votes
1 answer
346 views

How to upload Files along with Form Data using Angularjs? I am working on a UI that is built in AngularJs. It has a form where users put their details like Id, Name, Address, PIN etc. Along with that ...
Hrishikesh Joshi's user avatar
5 votes
2 answers
3k views

I'm replacing $http with Fetch API and got replaced $q with Promise API. Because of that, Angular didn't run digest cycles anymore, thus UI didn't render. To solve this problem I tried Zone.js and ...
Gaui's user avatar
  • 9,007
1 vote
2 answers
1k views

I am working in an angular project there I have a grid with some data and some actions. On clicking one of the action in onclick function an ajax request is going the server side which is once in a ...
Salini L's user avatar
  • 879
1 vote
2 answers
154 views

I'm working on a product catalog application using Ionic Framework, with php to retrieve product from database and ajax to load it in frontend, every thing is working great, but when i try to filter ...
M0ns1f's user avatar
  • 2,711
1 vote
2 answers
1k views

I used the console log which returned the array of data fetched from the server, but when I call the scope on the html I get an undefined error on the console. app.service('blogpostservice', ['$http',...
Taha Mouhtij's user avatar
0 votes
2 answers
1k views

I have a openstack object storage container to which I'm trying to upload files directly from browser. As per the documentation here, I can upload the file using a PUT request and I'm doing this ...
Raja Anbazhagan's user avatar
0 votes
2 answers
182 views

I am unable to fetch my json data using angular factory service. I seem to load the files correctly, no error on developer tools console, still the data is undefined on the request - means empty. ...
Barr J's user avatar
  • 11k
0 votes
1 answer
1k views

I want to send an api key for every request I make: function MyService($http) { var req = { method: 'GET', url: 'https://api.giphy.com/v1/stickers/trending', headers: { ...
handsome's user avatar
  • 2,448
1 vote
0 answers
67 views

I'm trying to get the header with $http, I send a response with the data and header with Node.js, x-auth is my custom header. I can get the response.data just fine, but when I use response.header('x-...
zb22's user avatar
  • 3,241
0 votes
1 answer
92 views

In the script below, I have posted a boiled down version of my code. It's essentially a simplified search engine. The script loops through the $scope.list_of_fruit array, and filters it according to ...
master_of_privates's user avatar
0 votes
0 answers
65 views

How does: xmlhttp.open("POST", "Service.asmx/GetChemicals", true); xmlhttp.setRequestHeader("content-type", "application/json"); Translate to the angular controller? Right now I am doing: var p = $...
Zee Fer's user avatar
  • 339
0 votes
2 answers
2k views

The issue I'm having is that $http POST is not returning the correct response. The data I require is stored under config instead of data The Http POST request: for (var i = 0; i < filmService....
Yacub Ali's user avatar
  • 137
4 votes
4 answers
487 views

I am trying to return an array from a function once onClick is triggered. I see the values contained in the array in the console. But I don't see the values displayed on the HTML page. The Controller:...
Yacub Ali's user avatar
  • 137
0 votes
2 answers
63 views

I'm having some problems trying to make http calls inside the same javascript controller which it gives me the error: 'function is not defined' If I move the function to the outside of controller, i ...
MLGonc's user avatar
  • 99
1 vote
2 answers
201 views

I am new to AngularJS, and after using the commands as shown in several youtube tutorials and reading the documentation, I cannot seem to get the data displayed on an API, using $http.get() request. ...
Keshav Sharma's user avatar
1 vote
0 answers
2k views

My get request with authorization header : return $http.get(serviceBase + 'api/values', { headers: { 'Authorization': 'Bearer ' + authService.authentication.token } ...
Arif's user avatar
  • 6,598
1 vote
1 answer
705 views

I'm trying use md-autocomplete with $http(), I can see the values in the console, but I can't display the data returned from the api request to the autocomplete. I tried using the return keyword to ...
Yacub Ali's user avatar
  • 137
0 votes
1 answer
105 views

I am writing a simple service that uploads a file and posts it to a Spring controller. The controller manipulates this data and returns several objects as JSON. I am working with the following Angular ...
giri's user avatar
  • 7
1 vote
2 answers
334 views

I have problem with sending variable by http.get, can someone correct me? $http.get("/product/products", { 'quantity': 5 }).then(function (resp) { $scope.products = resp.data; }) Thanks much
Turqus's user avatar
  • 117
0 votes
1 answer
108 views

I think the title pretty sums up what I want to achieve. I looked in different SO threads regarding the issue, some uses $q while others do not. So I tried to pull something simple: .factory('db',['$...
Johnny's user avatar
  • 111
0 votes
1 answer
917 views

My C# model: public class MyModel { public string MyString { get; set; } public int MyInt { get; set; } public List<MyList> MyList { get; set; } } public class MyList { public ...
Tomo's user avatar
  • 432
1 vote
1 answer
4k views

I have the folowing problem, i cant load the data from json. What I'm trying to do is access the given file address and spell the data but something does not load I tried and without async driver-...
Дарин Маринов's user avatar
1 vote
0 answers
46 views

I have built a mean-stack application. I use http to communicate data between front-end and back-end. For example, In front-end, I have app.factory('ops', ['$http', function ($http) { var o = {};...
SoftTimur's user avatar
  • 5,770
0 votes
2 answers
813 views

Is this a bad way to do this? I'm basically chaining promises, where each successful return from server, launches a new http.get() for more information BUT NOT when it errors. No more http.get()s if ...
Stellar Sword's user avatar
1 vote
0 answers
2k views

I'm trying to send a POST request to a rest API, but I don't seem to able to do it correctly, I don't know if it's the syntax, or what it could be, I've tried many different ways but nothing seems to ...
Jose Luis Arrondo's user avatar

1
2
3 4 5
9