Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dynamic Angular environment configuration #2669

Closed
olicooper opened this issue Jan 17, 2020 · 2 comments · Fixed by #2822
Closed

Add dynamic Angular environment configuration #2669

olicooper opened this issue Jan 17, 2020 · 2 comments · Fixed by #2822

Comments

@olicooper
Copy link
Contributor

I'd like to be able to build my angular application for production and then change the api urls and oauth config between environments. Is there a way to do this or can it be built-in?

@mehmet-erim
Copy link
Contributor

Angular UI modules can't access the application environment directly. The environment passes to the CoreModule inside the AppModule. See the AppModule.
Then, CoreModule add the environment to the ConfigState. All Angular UI modules consume the environment via ConfigState.

We can create an action named SetEnvironment to change the environment dynamically.

@olicooper
Copy link
Contributor Author

Yes that would work. I imagined creating a json file that I could read in similar to how aspnetboilerplate did it.
Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants