Skip to main content
0 votes
0 answers
33 views

How to collect the last 5 notifications that were created using angularjs-toaster?

I am currently trying to create a table with the last 5 notifications that were created using angularjs-toaster (https://www.npmjs.com/package/angularjs-toaster). I understand this service fairly well,...
roe than's user avatar
0 votes
0 answers
39 views

Why the value of my service is undefined when it's called out of $http

This is my service app.factory('checkMembership', function ($http) { var membership; return { setIsMembership: function () { $http.get('api/User/checkMembership').then(...
user10863293's user avatar
1 vote
0 answers
31 views

AngularJs - How to update Internal data within a Factory?

I have a factory in my app which takes environment uri data as input parameter and returns a $resource object as below. The coreService is a singleton object used in many other controllers of UI. ...
Sby's user avatar
  • 11
0 votes
1 answer
80 views

How to declare an AngularJs service with no parameters?

This works: 'use strict'; angular.module('MyApp').service('searchControllerPersistentData', ['$state', function ($state) { const Self = this; }]); but this gives an error in the controller ...
Mawg's user avatar
  • 40.4k
0 votes
2 answers
54 views

how can I use a function which is located inside a service?

What I am trying to do is to use function globally throughout controllers. The problem is when I want to use the function I defined inside the service in the first function. It shows an error that it ...
dumb11's user avatar
  • 129
1 vote
1 answer
53 views

AngularJS Services - Pass object between views/controllers

I'm struggling to understand the concept of AngularJS services, I'm relatively new to AngularJS. I'm essentially trying to pass a nested object between two controllers/views. So I have this ...
orangejuice's user avatar
0 votes
1 answer
143 views

How to wait for my services function to finish in AngularJS?

I made a service with a function. app.service('getService', ['$http', function($http){ this.getProducts = function(log = true){ $http({ url: "/admin/products" })...
Laszlooo's user avatar
0 votes
0 answers
534 views

AngularJS unable to perform file upload [duplicate]

I am doing a file upload in angularjs. I am unable to get the file object content before sending to my back-end. XHR, headers: XHR-Header I have no idea why because I can get the content in my logs. ...
user avatar
-1 votes
1 answer
231 views

AngularJS Unable to display upload file logs [duplicate]

I am trying to create a file upload function using angularjs which will just accept the file and send it to the server side (Django). To ensure the file upload function is working fine, I've placed ...
user3774763's user avatar
0 votes
2 answers
820 views

AngularJS file upload Error: $injector:unpr Unknown Provider

I am trying to do a file upload using angularjs. But I am getting this error for the past few days and I am unable to resolve: angular.js:13920 Error: [$injector:unpr] http://errors.angularjs.org/1....
user3774763's user avatar
0 votes
1 answer
422 views

Passing a JS-Class to AngularJS(1.4.x) service to use its variables and functions

I use angularJS(1.4) for frontend only. I have passed the JS-class DummyClass to an angularJS-Service called TLSService, and I added this service to an angularJS-Controller named mLxController. I'm ...
Schelmuffsky's user avatar
1 vote
0 answers
42 views

Exposing functions in js service format: Will this work?

Will this work? Service.js (function() { var module = angular.module('myApp'); var myService = function () { var myServiceMethod = function () { //some code }; return ...
drethedevjs's user avatar
0 votes
0 answers
58 views

How to Safely call an promise-based AngularJS service in a loop?

I am calling my Angular service as follows: $scope.testData.length = 10; for (var k = 0; k <= $scope.testData.length; k++) { myTestService.saveData({ Id: $scope.id, ...
Mel's user avatar
  • 333
0 votes
3 answers
678 views

How to access nested json property

I am getting this response from an angular service: response.data events: Array(1) 0: ingestionTime: 1560362454013 message: "{"server":"xxx.xxx","errorName":"HelloWorldError","error":"hello error"}" ...
bernardo's user avatar
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 ...
Dex's user avatar
  • 79

15 30 50 per page
1
2 3 4 5
102