Skip to main content
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
-1 votes
1 answer
50 views

How can I implement caching in angularJs factory?

How can I implement caching in the angularJs factory without using cacheService?
Ajinkya Bodade's user avatar
1 vote
0 answers
72 views

AngularJS - How to construct the url of endpoint with 2 parameters

I am relatively new to AngularJS and I was working on making the following within the Service with factory. I have the following call within the Service: factory.getUsers = function () { var ...
DAB's user avatar
  • 11
0 votes
1 answer
974 views

Migrating an AngularJS factory to TypeScript

I am in the process of preparing to migrate an AngularJS app to Angular. I am currently looking at converting the JS code to TS. I haven't had any issues with components and services but factories. I ...
ymrs's user avatar
  • 171
0 votes
1 answer
109 views

How to use module function inside another factory in angularjs

I have configurations.js file which having var configurationModule = angular.module('configuration', ['restangular', 'notification']); configurationModule.factory('clientConfigSvc', function (...
Santosh Kori's user avatar
0 votes
1 answer
79 views

Propagating Scope Events from a Factory

Neither $rootScope.$broadcast nor $rootScope.$emit is working from my factory I have $rootScope injected into the factory. The factory returns this function: alertHook: function() { $rootScope.$...
MMelvin0581's user avatar
0 votes
0 answers
77 views

AngularJS advice on converting Factory to Provider?

I need to inject content from a Factory into a Config but I know this isn't possible and is only possible if I use a provider instead, so please can anyone advise how to convert my factory into a ...
DominicA's user avatar
6 votes
1 answer
538 views

AngularJS injecting third party module ngIdle

I have a controller as shown below. (function () { "use strict"; var app = angular.module('Demo') .controller('MainController', ['$rootScope', '$scope', '$location', 'curUser',MainController]); ...
TheLoneWolf91193's user avatar
0 votes
1 answer
88 views

AngularJS Error, "Cannot read property of unknown"

I am trying to create a factory to retrieve weather data for a simple web page I am creating but, I am getting stuck when trying to call the function in the factory. I have fallowed Dan Wahlin's ...
Clint Clark's user avatar
1 vote
2 answers
474 views

Syntax error in openweathermap API request

I'm getting the following syntax error in the console while trying to get data from 'openweathermap' Uncaught SyntaxError: Unexpected token : Here is the JS file : var app = angular.module('App', [...
RoyBarOn's user avatar
  • 1,009
0 votes
1 answer
275 views

Not able to call factory method after including factory function with $provide.factory in angular.js

app.config(['$controllerProvider','$compileProvider', '$filterProvider', '$provide',function($controllerProvider, $compileProvider, $filterProvider, $provide) { app.register = { ...
phpnerd's user avatar
  • 926
0 votes
2 answers
39 views

AngularJS - Why does my factory not update the DOM?

In my html I have: <body ng-app='myApp'> <h1 ng-controller='controller'> {{YesOrNo}} </h1> <div ng-controller='controller'> <span>{{YesOrNo}}&...
Legend123's user avatar
  • 398
0 votes
2 answers
63 views

Error: "fourSquareService.getVenues is not a function"

AngularJs - how to use factory with form input as part of URL to fetch? First question here. I am studying angular and was trying to use separated files for my services and also using a user input on ...
Pedro Santos's user avatar
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("...
user avatar
0 votes
0 answers
109 views

AngularJS .then() function is not returning data after getting successful response [duplicate]

I am working on AngularJS 1.6.9 JSONP . My api endpoint gives projectInstance.jsonpCallback function as a response. Inside factory method i had created same callback function and i got the response. ...
user3760261's user avatar

15 30 50 per page
1
2 3 4 5
30