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
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/...
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
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 ...
0
votes
2
answers
198
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
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
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
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 ...
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 ...
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. ...
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 = ...
-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
0
answers
63
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 ...
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/...
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
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
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?
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 ...
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
0
answers
581
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 ...
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 ...
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
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 = ['$...
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
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 ...