Questions tagged [angular-config]

27 questions
2
votes
1 answer

Deploy URL Deprecated. How do I configure the alternative?

In Angular 13 when I build my application, I recieve the following warning: Option "deployUrl" is deprecated: Use "baseHref" option, "APP_BASE_HREF" DI token or a combination of both instead. For more information, see…
user1059939
  • 1,613
  • 2
  • 20
  • 37
2
votes
1 answer

Select angular.json configurations during docker multistage build

I'm building the angular6 app w/ a docker multistage build. The default angular.json created by angular.cli contains a build section including a list of configurations. I can select a specific configuration using the following command ng build…
Crixo
  • 3,060
  • 1
  • 24
  • 32
1
vote
0 answers

Include third party scripts as type="module"

Im trying to figure out if there is a way to configure angular.json to include scripts as type="module" assuming the following script needs to load as When i try this it does not add type="module".…
Tim
  • 3,576
  • 6
  • 44
  • 58
1
vote
2 answers

Angular 13 ng serve -> console.log() does not display proper filenames

If I create a new Angular 13 project with $ ng new my-test-app and add constructor() { console.log('Hello there'); } to app.component.ts, then do $ ng serve and open the browser.. "Hello there" is logged in the console, but it says it's coming…
jna
  • 926
  • 10
  • 18
1
vote
1 answer

Angular configuration for dev/prod

I use Auth0 service which provides me two client_id's - for development and for production. However, this has to be built-in source code: @Injectable({ providedIn: 'root' }) export class AuthService { // Create an observable of Auth0 instance of…
Luke1988
  • 1,850
  • 2
  • 24
  • 42
1
vote
2 answers

Default values config using forRoot works in Dev but not in Prod (Aot)

The following code works fine in Dev, but not in Prod mode: Module export class SpinnerModule { static forRoot(config?: SpinnerConfig): ModuleWithProviders { return { ngModule: SpinnerModule, providers: [SpinnerService, { provide:…
1
vote
1 answer

Using APP_INITIALIZER to load external Angular Configuration from Server

I have a pretty good idea about loading an external config file for an Angular app, but I have the following question: does the APP_INITIALIZER provided loading function get executed on the client side, after the AppModule had been delivered to the…
Sammy
  • 3,395
  • 7
  • 49
  • 95
1
vote
0 answers

How to configure Angular 2 with Spring MVC

I want to learn how to integrate Spring MVC with Angular 2. I have some questions: 1)Any good links to learn Angular 2? 2)Does Angular 2 has more support(from solutions point of view)? 3)Any links for referring examples for Spring MVC with Angular…
1
vote
3 answers

How to use angularjs config block?

I am new to angularJS and trying to learn it. I came across config function where I see two different arguments as in below example. Example 1 dashboardApp.config(function($stateProvider, $urlRouterProvider) { //$urlRouterProvider.when('',…
1
vote
3 answers

How to get config values from server in Angular?

My application needs some config values on application startup. Suggestions from the community is to store them as constant as separate module, preferably in separate .js file. This might work for me. However my configuration values are also stored…
LP13
  • 30,567
  • 53
  • 217
  • 400
0
votes
0 answers

Does Angular provide a method of outputting source maps to a custom location?

I have my angular (v16) production code minified. I don't currently output source maps because I don't want end users to be able to get to them. I want to start adding source maps to the production build so that production code can be more easily…
jake
  • 154
  • 2
  • 9
0
votes
0 answers

Pass environment data using forRoot

I'm trying to pass environment data using forRoot, here is code example: Parent app: @NgModule({ declarations: [AppComponent], imports: [ ... SimpleModule.forRoot(environment), // pass environment to Child app …
0
votes
0 answers

Combine Two Angular Apps

I'm pretty new to Angular and I did some research about how to combine multiple Angular apps into one app. However most of what I found are about creating multiple projects in one Angular app, which miss the instructions on how I can configure the…
0
votes
1 answer

Is there a way of loading different texts in my Angular application if a specific parameter is passed in a configuration script?

I am using ngx-translate module to swtich from english to my native language texts in my Angular application, like this

{{"USER_ROLE_MODAL.USERS.ERROR_1" | translate}}

where USER_ROLE_MODAL.USERS.ERROR_1 is the property in json containing…
0
votes
0 answers

Different config for shared angular library

I've 3 different libraries in 3 modules in my angular project: two separate libraries which include the same third library for some shared functionality. This third library has some configuration. Assuming each module has a service ServiceA,…
1
2