Questions tagged [angularjs-config]

26 questions
3
votes
4 answers

how to prevent duplicated $http requests in AngularJS app?

I need to prevent sending the same request repeatedly to API before the previous request will give the response. I have found out some solutions. But, I don't want to disable the button while waiting for response because I have more API calls in my…
3
votes
1 answer

Using Angularjs-Toaster inside the decorator of $exceptionHandler

I am trying to toast errors those are handled in the $exceptionHandler decorator as follows, var app = angular.module('myApp',['toaster']); app.config(function($provide){ $provide.decorator('$exceptionHandler',function($delegate,toaster){ …
JPS
  • 2,730
  • 5
  • 32
  • 54
3
votes
1 answer

Use angular compileProvider outside config block

I'm trying to create directives on the fly, actually I achived that, but seams pretty hacky. This was my first approach: function create(myDir) { angular.module("app").directive(myDir.name, function() { return { template:myDir.template …
3
votes
2 answers

AngularJS ng-view not loading template file content

I'm trying to set up a demo angular app but for some reason my partial (partials/test.html) content isn't loading into the layout file. Here's the index.html:
novon
  • 973
  • 3
  • 15
  • 30
2
votes
0 answers

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 great except the date is reset to…
paul590
  • 1,385
  • 1
  • 22
  • 43
1
vote
1 answer

In Angularjs, how to block user approaching to some pages?

I'm using ui-router and $stateProvider to show views. This project is for building admin page, and there are three accounts. My purpose is some pages must be shown to each accounts only. So, I've used ng-if to not show on nav-bar, it was…
Canet Robern
  • 1,049
  • 2
  • 11
  • 28
1
vote
1 answer

Angular injector error with Filestack

I am attempting to integrate Filestack into an existing app. I think I am having issues with how those modules are configured, but can't get the ordering correct. I receive this error: angular.js:38Uncaught Error: [$injector:modulerr]…
1
vote
2 answers

Disabling Strict Contextual Escaping (SCE) in AngularJS

I'm trying to disable SCE in AngularJS. According to the documentation this is what needs to be done: angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) { // Completely disable SCE. For demonstration purposes only! …
Curtwagner1984
  • 1,908
  • 4
  • 30
  • 48
1
vote
1 answer

AngularJS 1.5 config delay

I am learning AngularJS and TypeScript and built a very basic application to get myself going. An application, that loads a element-directive onto a page, very simple, but I keep hitting an error: "Uncaught TypeError: Cannot read property…
1
vote
0 answers

Using a factory in config

I know the config phase runs before the services are available, but I have a situation where I need to use a myJsonDateTimeService to inject a $httpProvider.defaults.transformResponse like that: angular.module('myJsonDateTimeInterceptor',…
1
vote
0 answers

Can I change variables of pre defined constants in angularJs?

I defined a constant 'ngGPlacesDefaults' which sets default values of 'google place search' config file. But now I want to change the values of defaults dynamically i.e types:['airport'], types['backery'] etc as needed. And for this I injected the…
1
vote
0 answers

Formatting a date in custom request transformer

I'm new to AngularJS and I'm hitting the ground speeding at about 100mph. I'm trying to call a RESTful service from an angularjs site. The RESTful service uses an NH-HMAC authentication scheme. Part of the HMAC256 hash the service expects is a…
Josh
  • 2,955
  • 1
  • 19
  • 28
0
votes
0 answers

Angularjs lazy loaded factory and register https interceptor not working

I am using angularjs, load and register controller, service and factory lazy loaded. My configuration file is similar to Dave's Answer which is used for registration and work fine. Now i want to create a separate file containing factory definition…
rahul
  • 1,062
  • 5
  • 15
  • 31
0
votes
1 answer

Building $routeProvider based on Role

I have a very simple requirement. I have 3 User Roles: CATUSER LICUSER ALLUSER I have the value of the User Role in the $rootScope.userRole variable. I have the User Role already defined before the AngularJS application starts because AngularJS…
Ankit Prajapati
  • 1,425
  • 3
  • 14
  • 22
0
votes
1 answer

AngularJS - module uses config from a different file

I am new to AngularJS and I don't know if this is possible. This is my current code: var app = angular.module('qlikCockpitApp',['pascalprecht.translate','720kb.tooltips']); app.config(['$translateProvider', function ($translateProvider) { ...…
1
2