0

I'm new to angular and I wondered what were the options to parameterize an angular SPA against an external configuration (a .properties file in the fs for exemple). Is there an idiomatic way of doing this?

Thanks in advance.

R. G
  • 257
  • 2
  • 14
  • 1
    Check out this link: https://stackoverflow.com/questions/43193049/app-settings-the-angular-4-way. If you are using the CLI, scroll to the end for the CLI solution. – DeborahK Aug 01 '17 at 00:24

1 Answers1

0

Since I'm using Angular CLI I could use the environment.ts file.

The documentation being here

Be careful though, I spent alot of time trying to make it work and realized that the feature was broken in version 1.2.2 (it is apparently fixed in version 1.2.6). More informations here and here

R. G
  • 257
  • 2
  • 14