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

0
votes
0answers
21 views

AngularJs http request concats my data into a JSON key

Sometimes a behavior is so bizarre that I don't even know how to begin to google it. I'm fairly new at Angular, and I am trying to send POST data to my node server from the client. Here is the ...
2
votes
2answers
62 views
+50

CellFilter is getting called before $http Response in UI-Grid

I am using ui-grid to bind data from Role Table which contains Department Id as PrimaryKey. I am calling Web Api to get all the roles in the table and show in ui-grid. Department Table Role Table ...
0
votes
1answer
143 views

Getting the response as “data”:null,“status”:-1 when calling web api from angular js

I am trying to call Web API GET Method from Angular JS 1.6.0 and getting the following error:- Possibly unhandled rejection: {"data":null,"status":-1,"config":{"method":"GET","transformRequest":[...
3
votes
1answer
88 views

angularJs get blob type

I have webApi return me a blob file that I have to display. how can I know what type is the blob that I got? It could be anything, pdf, doc, jpeg etc. $http({ method: 'GET', url: (itemsUrl), ...
1
vote
1answer
67 views

Non UTF-8 characters in PDF Javascript Blob

I have a PDF file that I serve from a WebApi 2 application to an AngularJS client. I use file-saver to then save the file on the client as follows (in TypeScript): this.$http.get(`${webUrl}api/...
0
votes
2answers
37 views

Custom error message with content-type response

I'm trying to implement some error handling into my MCV AngularJS application, but came across this one issue that I'm not sure how to solve. Structure In my AngularJS service ticketService I have ...
0
votes
0answers
23 views

Angular JS 1 http.get returns 404 when token is sent in headers

I am using angular.js and .net web api with owin secured. Following this tutorial , I have implemented an interceptor service that sends token as well for each http request. here is the code of that ...
0
votes
3answers
54 views

Http service delay processing until after data is returned

I work on my angularjs project. I created this service: (function () { "use strict"; angular.module("manageItems").factory("manageItemsService", ["$http", "config", manageItemsService]); ...
0
votes
2answers
52 views

Using AutoComple ngTagsInput in Angular JS

In my project, i use ngTagsInput for tagging. I have a problem, I did loadTags. I got from API and I tried to change structure like {text : sometag}. And then my autocomplete tag is not working. even ...
1
vote
2answers
230 views

Angular 1.6.3 is not allowing a JSONP request that was allowed in 1.5.8

Angular 1.6.3 is not allowing a request that was allowed in 1.5.8 and I am getting this error: $sce:insecurl Processing of a Resource from Untrusted Source Blocked The full error is available here. ...
0
votes
1answer
29 views

Data Array Always Process to String not Array With Angular.fromJson

I have a problem, I did set field form to array. Example : Field dfp_interest in response is []. So, i must set my data to array right ? I did and success in console.log. Result like --> ["5","6"] but ...
1
vote
3answers
43 views

Controller not logging response from Nodejs using Angular $http service

I created a form and onclick of the form i want to see the response from the server(nosejs). In Angular Controller Im calling the service. The response is visible when called from the service itself, ...
0
votes
2answers
87 views

AngularJS fetch the data from WebApi - errors not showing

I have encountered a similar issue for my all example programs with angularJS fetch data from the WebApi. I think there is nothing to do with my code, but some settings that may be I ignored, please ...
0
votes
1answer
44 views

Basic authenticiation in $http Get request

I am trying to access a REST API service with basic authenticiation. This works perfectly as a curl request: curl -D- -X GET -H "Authorization: Basic eW**********0NQ==" -H "Content-Type: application/...
0
votes
0answers
104 views

http get response to download excel file

I am using web api http get call which returns the response as below in controller. 'pck' below is of type ExcelPackage. { Byte[] fileBytes = pck.GetAsByteArray(); var response = new ...
1
vote
2answers
54 views

Fetching JSON data from multiple web api methods ($q.all)

I have a simple app with a form. When the form loads I want to call a couple of web api methods to fetch the json data used to initialize the form. The form is working fine with hardcoded data in my ...
0
votes
2answers
96 views

AngularJS save image file sent from Web API 2

I have been trying to follow different posts on downloading a file sent from my Web API. So far I can get the file to come, it will open the download window and it will save. However, I cannot open it ...
0
votes
1answer
67 views

$http service in Factory returns undefined in AngularJS

I am new in angularJS and try to make a CRUD operation to clear my concept. I try to use angular factory but I google a lot and unable to find any solution on below concept. I just want to use my ...
2
votes
1answer
109 views

AngularJS $http success function not working

I am very new on AngularJS and I am following a tutorial to send REST request to a server. This is my code angular.module('myApp') .controller('MainCtrl', ['$scope','$window','$http', function($...
0
votes
0answers
37 views

Using $inject in a service is giving an error Error: [$http:badreq] - Angular JS

There is a register form. On submit of register form I am trying to save the data through angular service. It is giving me an error Error: [$http:badreq] This is my register.controller.js (...
1
vote
1answer
55 views

angularjs country code look up from jsonfile via $http request

I am trying to look up country codes from a json file to get the full country names: $scope.fullname = function (option) { $http.get('files/names.json').success(function (data) { for ...
0
votes
1answer
51 views

angularjs $http.jsonp success data access it elsewhere

How can I access the $scope or the data obtained from success in $http outside the $http.jsonp() request? $http.jsonp('http://example.com/?callback=JSON_CALLBACK') .success(function(data) { ...
0
votes
0answers
70 views

How to make a rest get call using jsonp and angularjs for a text/plain response

I'm trying to do the following rest call using $http.jsonp method for the following rest api that returns a text plain string like this 0 1 1 1/1 * ? * I get the response but I get the following ...
0
votes
1answer
105 views

Rest Webservice call in AngularJS ( promise )

AngularJS : 1.4.X Scenario 1: Works fine Scenario 2: Throws 404 error on line xhr.send(isUndefined(post) ? null : post); in angular.js I'm trying to add inbuilt angular cache to our existing app, ...
0
votes
3answers
55 views

How to encode URL in angularJS

I'm trying to get the data from my Rest API controller using anuglarjs http GET request. However, the params that I need to send include "." symbol which caused the URL failed. I tried to encode it ...
0
votes
4answers
20 views

Persisting Scope beyond get request in Angular

I have the following code: $http({ method: 'GET', url: 'http://localhost:8080/getStuff' }).then(function successCallback(response) { $scope.stuffData= response.data.length; }, ...
0
votes
2answers
321 views

How to download a zip file in AngularJS / FilesaverJS

i have a service function which return me 3 result files(2 text files, 1 zip file). i want to check the header of the response to see if the file is a zip or a text to set the right configuration to ...
0
votes
1answer
41 views

Angularjs inconsistent delays between $http.get and $http.post

Here is a part of the code of one of my controllers. //service call to add record to database //bookApi has addBook method which contains a $http.post inside bookApi.addBook(book); //service call ...
0
votes
2answers
77 views

How to upload files to AWS-S3 with Angular $http PUT

In my Angular application I try to upload a file to AWS-S3 with $http.put(url, file). However it's not working, I get back a HTTP-403 Forbidden telling me that the signature s3 calculated differs ...
0
votes
1answer
68 views

Angular / Controller loading a json file fails with an exception I can not understand

sorry, maybe a stupid problem, but I am still a newbie with angular. The code: -- EDIT #2 -- ----- ----- ----- ----- ----- ----- ----- MyApp.controller('DataController', ['$http', function ($...
0
votes
2answers
222 views

Getting PHP AJAX response data with Angular $http Service

I'm sorry if this is repeating previous questions, but i haven't been able to find a solution which seems to work with my problem & im new to Angular. I have an Angular form, which communicates ...
0
votes
0answers
27 views

AngularJS Display JSON data in view [duplicate]

In my module I have a service that calls $http and gets an Array of objects, function MenuSearchService($http){ this.getMatchedMenuItems=function(searchItem){ var ...
1
vote
2answers
69 views

angularjs change rootscope after promise in a controller

I'm trying to change some $rootscope variables from within a controller after a I have received a promise from a service. The $rootscope variables are used to set the html page title attribute etc. ...
1
vote
2answers
46 views

$http GET method Displays Blank Page

I tried to parse json using below code but it is displaying a blank page. var app = angular.module('myApp', []); app.controller('myCtrl', function($scope, $http) { $http.get("http:krispypapad....
1
vote
5answers
110 views

Chaining multiple $http.get() ng-init angularjs

Im working on a scenario where on page load i have 2 $http.get() request. One $http.get() are independent on another $http.get(). Every thing works fine.But in some situation my 2nd $http.get() ...
3
votes
3answers
153 views

angular component one-time binding from $http shows undefined

I'm new to Angular. I'm trying to use components (1.6). In the parent, I have an $http.get that gets data from a service and then assigns the response to a $scope variable. That scope variable is ...
0
votes
3answers
181 views

Getting json url links (Youtube) to show using angularjs

I'm trying to use AngularJS to get data from a json file which has video objects. However, I can only figure out based on other resources/references how to take ONE specific url and concatenate it ...
16
votes
5answers
17k views

Error with $http.get in angularJS — Success not a Function

Getting this error: angular.min.js:122 TypeError: $http.get(...).success is not a function at getUserInfo (app.js:7) at new (app.js:12) at Object.invoke (angular.min.js:43) ...
-1
votes
2answers
362 views

AngularJS - Make synchronous http request

Angular Service this.sendCommand = function (someData) { URL = myURL; return $http({ method: 'POST', url: URL, ...
0
votes
1answer
66 views

Managing data from http method in controller with AngularJS 1.5 components

Ng-repeat in component can't show data charged from $http.then in controller. What am i doing wrong? Service calling rest method in app.js: app.service('dataService', dataService); function ...
1
vote
3answers
40 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
23 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
53 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
205 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
35 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 ...
2
votes
0answers
508 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
14 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
63 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
137 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
169 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(...