All Questions
Tagged with angularjs-http angularjs-controller
20 questions
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 ...
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
1
answer
99
views
Retrieving data out of post success from separate controller angularjs
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 ...
0
votes
1
answer
557
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 ...
0
votes
1
answer
842
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, ...
6
votes
1
answer
14k
views
Angular JS TypeError: $http is not a function
I have read through all the posts where people get this issue where $http is not a function, and it looks like for the most part it is due to injections being done in the wrong order.
My module ...
0
votes
1
answer
3k
views
Storing HTTP Response as a Controller Variable
I'm wondering if there's a way to take an $http response and store it to a controller variable as opposed to the $scope. For example:
app.controller('testController', function($scope, $http) {
...
0
votes
2
answers
101
views
Compare 2 GET object from different controllers
I have 2 (array of) objects from 2 different controllers.
Object 1 (Name Controller 1):
[{id:1,"name":"jakov"},...]
Object 2 (Nickname Controller 2 ):
[{id:1, "nickname" : "jandric", "nameId" :1, "...
0
votes
2
answers
1k
views
Slim Post method not working with AngularJs Http Request
This is my AngularJS controller :
app.controller('emailConfirmCtrl', function ($scope, $http) {
$scope.check_credentials = function () {
var request = $http({
method: 'POST',
url: '...
5
votes
1
answer
39k
views
TypeError: (intermediate value)(intermediate value).success is not a function (angular)
I have difficulties understanding this error... I dont quite understand why its not a function....
angular.module('mkApp').factory('mkService', function ($http, $log) {
function getLookUp(successcb)...
3
votes
1
answer
4k
views
AngularJS access variable inside $http.get
app.controller('EntryCtrl', ['$scope', '$http', function($scope, $http){
$http.get(something.json).success(function(data){
$scope.entries = data;
});
abc = $scope.entries.timestamp; ...
4
votes
1
answer
4k
views
How do you check if the data is null in http.get in angularjs AND do something?
My code:
<script>
function customersController($scope, $http) {
$http.get("https://tic.com/testingservice/HttpService.svc/operator/Var1/Var2")
.success(function (response) { ...
0
votes
2
answers
345
views
$http.get is undefined when $http is used outside angular code
I am running jasmine unit test against a method which is outside angular controller.
Running the jasmine throws the following error,
TypeError: Cannot read property 'get' of undefined at testMethod
...
4
votes
4
answers
868
views
AngularJS $http use response in multiple controllers
I have an app where I am loading a bunch of albums in one partial and then when a user clicks on each individual album, they get details for the album like songs, etc. Right now I am pulling the data ...
3
votes
2
answers
7k
views
AngularJS: assign $http.get data to variable
I try to assign data from $http.get to variable in my controller.
$http.get(URL).success(function (data) {
$scope.results = data;
console.log('results in $http.get :'+ $scope.results);
...