62 questions
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. ...
1 vote
0 answers
166 views
Angular JS: Unknown provider: $mdThemingProviderProvider <- $mdThemingProvider
When the High Contrast Mode is on, I need to use the dark theme and is working as below: $mdThemingProvider.theme('default') .primaryPalette('green') .accentPalette('orange', {...
0 votes
0 answers
80 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 ...
0 votes
0 answers
65 views
Why does running this AngularJS code locally work, but not on IIS?
I have a settings provider that runs fine on localhost, but doesn't work on IIS. The error from AngularJS is: [$injector:modulerr] Failed to instantiate module app due to: Error: [$injector:unpr] ...
3 votes
1 answer
332 views
Create unique instance of provider ionic 3
I am creating an Ionic app. I have 3 providers - database provider, portfolio provider and user provider. All 3 are Injectable. I have created it this way because several other pages need to use their ...
0 votes
1 answer
225 views
typescript not recognizing the interface on angularjs providers $get method
OK, so I wanted to have a provider which would allow me to closure the reference for the state provider. So, I've got the JS code and I'm trying to migrate it to TS. This is what I've got so far, ...
1 vote
1 answer
71 views
JavaScript- calling a function defined inside a provider
I have recently taken on the development of web app that has been written in AngularJS. In one of the files, myApp.js, there is a provider that is defined as follows: .provider('myAppConf', function($...
0 votes
0 answers
77 views
AngularJS service cannot access its own functions when used through provider
Here's my provider: class testPr { .... /** @ngInject */ $get($rootScope, $timeout, $window, FacebookService) { const _this = this; this.sdkInit($rootScope, $timeout, $window); ...