426 questions
0
votes
1
answer
28k
views
getting Error: [$rootScope:inprog] $digest already in progress when changed from Fetch to $http + $q
I'm trying to do a http request inside Angular.js factory. Initially I had used Fetch API and the console didn't show any error. I implemented it using $http along with $q and now it shows errors on ...
0
votes
1
answer
43
views
Pass a common data in all $http services in angularjs
I wish to send a particular data in all the $http calls. Can i define it somewhere so that i need not alter all the $http calls.
For example,
$http({
method: 'POST',
url: serviceUrl,
...
0
votes
0
answers
342
views
How do I display data from Multiple Google sheets using JSON feed URL
I'm able to display results and search for data from spreadsheet which has only one sheet. Using od6 as JSON URL : var url = "https://spreadsheets.google.com/feeds/list/...
1
vote
2
answers
646
views
Call MVC Controller from AngularJS using JSON in ASP.Net MVC
JsonResult method not calling through $http call,
I am working on a project that uses ASP.NET MVC, AngularJS I am calling a mvc controller from AngularJS. I am getting an jsonresult as in the call ...
0
votes
0
answers
327
views
Getting 415(unsupported media type ) in ajax formdata post resuest to spring
Want to send image data through ajax to the controller .But error 415 gets .I am using angular js and send images to the controller . But error ocurs . Please help
fd= new FormData(); ...
0
votes
1
answer
39
views
AngularJs depoyed site SyntaxError: Unexpected identifier
I've developed a ASP.NET WEB API Angularjs application and after i published it in IIS server it was throwing Unexpected identifier error at URL of below code.
function getAllWeeks() {
var ...
0
votes
3
answers
122
views
I am trying to return a data from custom angular JS service to the controller but it is always returning "{}"
I have written a custom angular service that returns the session id after making a post-call to the WCF service. I can see on the chrome's network tab that the call has returned the session-id but ...
-1
votes
1
answer
87
views
Promise Chaining is not working as expected
I am trying use the promise chaining for the $http.get calls I am making from my angular application
$http.get(url, config)
.then(newViewRequest)
.then(function (response) { // success async
...
0
votes
2
answers
191
views
$http.get to handle two different calls [duplicate]
I am trying to call a endpoint using $http.get and check if the succsess code is 200 then use the response data otherwise I need to call other endpoint. I tried to check if the call is success or ...
0
votes
1
answer
238
views
AngularJS - Directive - onClick function calling $http(POST) - $http is undefined?
I have an AngularJS directive that calls data from an api using $http (ng.IHttpService) with no problems.
I have the 'click' event bound to a function and want to call a POST request on the same api ...
0
votes
2
answers
416
views
How to "pass variable from $http success to another $http request" in Angularjs?
I can't access the output variable from my 1st http get request, i need this data for another http Post request.
None.
$scope.submit = function(x) {
$http({
method: "GET",
url: url + '...
0
votes
0
answers
153
views
how communicate backend without typescript in angular
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 ...
0
votes
1
answer
40
views
Service using $http not returning new data
AngularJS ng-repeat not changing when array changes
I have a controller:
<section data-ng-controller="FilmController">
<article data-ng-view></article>
</section&...
0
votes
3
answers
567
views
How to pass data from one asynchronous to another asynchronous function in AngularJS
How to pass global variable value from one function to another function in angular?
I have 2 global variables as:
$scope.genewtId = null;
$scope.data1 = null;
I have 2 angular functions which look as ...
0
votes
0
answers
323
views
Strange behaviour of response when it isn't json in angularjs get
I have problem with error in angularjs:
Error: [$http:baddata] Data must be a valid JSON object. Received: 'test string test string' Parse error: "{}"
So if I understand it correctly, the response ...
1
vote
1
answer
550
views
Cannot access AngularJS $http error response data
I'm running a function, and when I enter data correctly it does exactly what I need it to, but when there is invalid data provided I want to return an error message to the user. As you can see in the ...
0
votes
1
answer
114
views
angular js keep showing me undefined value when i use http post
i'm trying to pass a value to a php file using Post when i do that and i want to read the value from php as json it keeps telling me it's undefined. I don't know where is the mistake
this is my ...
0
votes
2
answers
180
views
$q.all returns same response for all promises in the array
I'm facing some difficulties while trying to understand why $q.all returns the response of the last promise in array, for all promises given:
function getGlobalData() {
$q.all(
[
...
2
votes
1
answer
2k
views
How to POST content as application/x-www-form-urlencoded
angularjs $http.post is refusing to use my Content-Type
I am working with a contractor - their team are making server-side APIs while I'm putting together a javascript application using angularjs. ...
1
vote
2
answers
338
views
How to ng-repeat response data
I have a simple piece of code that sends data to php for processing and then it returns it.
I would like to ng-repeat that data in the page, I just can't tell what isn't right.
I must point out to the ...
0
votes
1
answer
51
views
AngularJS call callback function
I want to call a callback function but i can't get the data because my call is wrong.
I tried:
//function with callback
filterList: function(type, cb) {
if (type == 'all') {
var resource = ...
0
votes
1
answer
373
views
how to pass the data from angularjs to spring controller
Angular js code
var app = angular.module('myApp', ['ngResource']);
app.controller('UserController', ['$scope', '$resource', '$http',function($scope,$resource,$http)
{
$scope.deleteRec = ...
-1
votes
2
answers
169
views
Angular-js $scope variable is not updated in view
I am new to angular-js and building a simple to-do application. I am creating a task and displaying the created task in a html table using ng-repeat. But the problem is that after posting the data, $...
1
vote
1
answer
44
views
AngularJs - PHP POST issue
I am trying to make a post request with angularjs to php. The post response is always 200 OK and the returned 'data' variable in the response is empty always. I am kind of new at this as you can see, ...
1
vote
0
answers
61
views
Angularjs HTTP interceptors exceptions
I'm using angularjs HTTP interceptors to intercept all my calls to the back-end, is it possible to give some exceptions to some specific HTTP calls? I've been on Google for the past 2 days and can't ...
1
vote
1
answer
232
views
How repeat http call in AngularJS if response data is null and response status is 200
I am using a service that will send back XML with data in response. As a rule, everything works fine but sometimes the server incorrectly sends empty XML, without data.
var isokLayer = $http({
...
0
votes
1
answer
37
views
AngularJS - Table not getting populated from xmlhttprequest
Hello Everyone i am new to angular js and i have written the following page which suppose to display a table of employee details which is coming from " http://localhost:8080/SpringRestHibernateWebTest/...
0
votes
1
answer
540
views
How to pass $http data from Service to Controller in AngularJS
AngularJS not working when I pass controller to the view
I have a problem and I can't troubleshoot it. In my simple app (very simple) I have a service that provides of users info. In angular I have an ...
1
vote
2
answers
806
views
Angularjs $rootScope:infdig Error calling http in view method
I'm trying to get some information from a server in an html page of an AngularJS app. The method itself is working fine, however, when I call the function in my html file with $scope. I get a $...
0
votes
1
answer
581
views
AngularJS CORS http call not working but plain Ajax & jQuery working fine
I have a simple cross domain service designed to handle the Simple CORS request. I am able to call it through plain xmlHTTP call or jQuery($.ajax) but its throwing Access-Control-Allow-Origin error ...
0
votes
1
answer
772
views
Web Api Insert Works in Postman but not from code [duplicate]
The following simple insert record method works in Postman but I can not get it to work in my AngularJS controller.
Postman Headers (Post)
Key ContactID Value 0
Key FName Value John
Key ...
0
votes
1
answer
203
views
Integration of Ionic (Angularjs) and Devextreme Datagrid, failed to display data from $http JSON
I am developing an ionic application by using Angularjs. In my application, I have to integrate with devextreme component like Datagrid.
When I tried to put JSON locally and display in devextreme ...
0
votes
0
answers
82
views
Inspect http request in angularJS 1.7.0
I need to see if the request starts from an internal or external network.
How can I intercept the http in angular 1.7 request and find the information I'm looking for?
0
votes
1
answer
27
views
AngularJS Post not working
This is a function that gets executed after submitting a form which then submits data to an api, all of this is being done in angular 1.5 using the $http service
I have used postman to test this ...
1
vote
3
answers
238
views
How to handle If Data returning from $http.get() is not in JSON format, Its a normal Text?
I am using get API to request data from a specified resource.
$http.get('http:...').success(function() {
});
But I am getting error
"SyntaxError: Unexpected token r in JSON at position 1",
How ...
1
vote
1
answer
95
views
AngularJS $http.get with ngRoute how to list details
Maybe someone will help me. I write an app in angularjs, I have a file named list.html which retrieves a list of posts from jsonplaceholder and lists them, with a link to the details of the post. In $ ...
2
votes
0
answers
21
views
update call losing Date value in config variable
Hello I have an application that creates an object which holds a Date variable. The object is then passed into an http update function. Unfortunately, the update when it goes through everything looks ...
0
votes
2
answers
57
views
AngularJS - Factory from Controller - not getting value from $http.get
I have a newbie question here.
I am coding a factory in angularJS. With it I want to have a list of users, and also a method to fill it.
So this is my code ...
The factory
app.factory("...
0
votes
0
answers
580
views
Angularjs: view not updating when variable changes in success method of promise
I am calling a backend API using a factory method in angular. The factory method
returns $http directly.
In my controller, I am calling the factory method and fetching the data. The factory returned ...
1
vote
1
answer
122
views
Passing Data through Promise Chain (angularjs)
The question is hard to describe so let me post an example.
The context is AngularJS $q, but any solutions based on ES6 Promise are also welcome.
Suppose we want to cancel an $http request. In ...
0
votes
3
answers
417
views
How to all data at once and apply to controllers in angularjs
i want to get all data at once through AJAX($http) request and apply to all controllers
i picked this code from google it shows the i have to make requests for each controller were i can get data in ...
1
vote
1
answer
663
views
PhoneGap - Angularjs http service (PHP API call) Not Working
I try to use Angularjs http service to call my PHP API. Everything working fine in Browser. But, when I test it on my Android Phone, it will not work.
My Issue:
In Android PhoneGap Application, ...
0
votes
2
answers
286
views
how to add response data to $scope object to use in ng-repeat
Hello all i was trying to get response from $http.get method and append it to $scope object but it was stating undefined. After some research and referencing found the way to assign the data to object....
0
votes
1
answer
68
views
How to bind data to scope object that i can use it in ng-repeat
I am getting a response from the server and due to async behavior I instantiated scope object first before the call and used it in method. I am getting the response in self-object but unable to bind ...
0
votes
1
answer
349
views
AngularJS V1.6 JSONP is giving $http.badjsonp error
I am trying to get details from an external API but got stuck in getting the JSON response.
Here is my service code:
angular.module('app').factory('appService', appService);
appService.$inject = ['$...
0
votes
0
answers
43
views
angular jsonp is not giving any response
i am hitting third party library from angular js. They sent response inside callback function . i am using http Jsonp method to try to get that response.i didn't get any response.
getActiveProduct: ...
1
vote
1
answer
1k
views
post request odata with cors
Im writing a little service using c#(.net framework) and odata V4. My clientside is AngularJs.
On my localhost everythink works fine, but when Im releasing my code to the server(widows server 2012 R2) ...
0
votes
2
answers
362
views
AngularJS http status 0 and redirection
I have an application with Angularjs and Coldfusion.
I have a form with some http queries for populating drop-down list.
When the session server is out, I retrieve the status from the server, I ...
0
votes
1
answer
832
views
AngularJS form.validation is not a Function
AddClass.cshtml File has the form and ng-validate uses the validation option. When I click the Add Class button in cshtml file without entering any value in Textboxes, it should show error messages ...
0
votes
2
answers
2k
views
Creating HTTP Response object
While calling a service, it calls API using $http method. In the same service I want to add conditional statement which is responsible to return another success or failure object without calling any ...