Questions tagged [angularjs-config]

26 questions
0
votes
1 answer

Accessing constant or cookie value in configuration phase of angularjs

I want to access values stored in Cookie in config phase of angularjs, how can I do it? Is it possible? I currently have the below code inside app.config(function(..., $translateProvider){...}) which is working perfectly fine: var defaultLang =…
Pranay
  • 432
  • 4
  • 14
0
votes
1 answer

How to inject dependency using explicit annotation in angular js

I recently enforcing ng-strict-di in an old code base and now getting warnings and error on running the app. For instance, in the below code export default angular .module("profile", ["ui-router"]) .controller("profileCtrl", profileCtrl) …
user7890278
0
votes
1 answer

How to use lodash/underscore in angular config

I'm trying to use underscore or lodash in angular.module("",[]).config(function(){/* Here */}), but it is expecting a Provider and throwing Unknown provider. Should I just use _ from global scope? (which is not preferrable) Is there a way to inject…
skmasq
  • 4,470
  • 6
  • 42
  • 77
0
votes
2 answers

Accessing OSGi config data in app.config in AngularJS

I have a jsp file which is getting data from OSGi configuration in AEM, like below Now in my JS file, I am initalising my angular app like below: var app = angular.module('myapp',…
RiksAndroid
  • 815
  • 11
  • 17
0
votes
1 answer

Set component TemplateURL to configured path

I am trying to set up a component with a templateURL that is a relative path given a configuration module. However, since it is outside of a controller, I can't figure out how to bring in the dependency to the…
pasquers
  • 772
  • 1
  • 8
  • 24
0
votes
2 answers

Inject service in app.config?

I want to inject a service into app.config any idea please ?I want to inject a service into app.config any idea please ?I want to inject a service into app.config any idea please ? app.js 'use strict'; angular.module('crud', [ 'ngRoute', …
letseasy
  • 47
  • 1
  • 3
  • 11
0
votes
0 answers

TypeScript AngularJS directive for compile?

How do I implement this in AngularJS 1.5.4 with TypeScript 1.6.2? Here is the vanilla JavaScript version from the official docs: $compile#example I've found this, but it doesn't work: Angularjs+Typescript directive implementing $compile Here lies my…
0
votes
1 answer

AngularJS: Order of execution of config blocks

In case, there are multiple config blocks for an angular module, in what order would they get executed? In my angularjs application, I am using $routeProvider to configure the routes in the config block. Is it possible to override/extend this route…
dinup24
  • 1,652
  • 3
  • 16
  • 26
0
votes
0 answers

AngularJS modularity and configuration

I have a feature that has controllers, services, and templates in it which I want to use in two separate projects. I've put template and controller names into a constant so I can change if I need. It works almost perfect. However, in a view, I need…
yogurt
  • 380
  • 1
  • 10
0
votes
2 answers

unable to inject custom service inside the run function of Angularjs application

I am new to Angularjs and have written my app.js which has the run function defined. I also have a custom service called coreService which I need to inject into the run function. When I inject, I get an error stating Error: [$injector:unpr] Unknown…
zilcuanu
  • 3,451
  • 8
  • 52
  • 105
0
votes
0 answers

angularJS $window not defined

UPDATE: I understand that $window cannot be pick up (i.e. other post) but what is my alternative to get that global variable into my .config?? I am having issues with $window, I have a global variable set on my main page and I am trying to get…
Tekill
  • 1,171
  • 1
  • 14
  • 30
1
2