Can I dynamically change the deploy url when app start ?
See original GitHub issueI know that I can use the angular-cli to config the deploy-url like --deploy-url http://xxxxxxx/
, but when I want to change the deploy-url I must to build again. I want to write somethings global like
<script type="text/javascript">
window['setting'] = {
'siteurl':'https://xxxxxxxx/'
}
</script>
in the root html. And Can I set the deploy-url use the already exist variable when the app start so that I can change the url without build again?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:15
- Comments:15 (2 by maintainers)
Top Results From Across the Web
Angular How to set Dynamically(runtime) --deploy-url?
I was looking to serve Angular files from CDN. Ended up adding this code to main.ts: declare let __webpack_public_path__: any; ...
Read more >Firebase Dynamic Links
In addition, Dynamic Links work across app installs: if a user opens a Dynamic Link on iOS or Android and doesn't have your...
Read more >Building for Production - Vite
When it is time to deploy your app for production, simply run the vite build ... The exception is when you need to...
Read more >Deployment - Angular
When you are ready to deploy your Angular application to a remote server, you have various options for deployment. Simple deployment optionslink.
Read more >Review apps - GitLab Docs
Deployed under a dynamic environment that can be reached by selecting View app ... Once set up, the review app link in the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t know if anyone’s reading this topic before advising anything, but the main question is about “changing deployUrl” when app is already running (in runtime). Not on the stage of building app with angular-cli, as @RajnishKatharotiya @ctrl-brk are proposing.
I think this issue is a duplicate of https://github.com/angular/angular-cli/issues/3855. There are suggestions there on how you can setup runtime configuration.