question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can I dynamically change the deploy url when app start ?

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Reactions:15
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
Kamiliuscommented, Mar 22, 2018

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.

7reactions
filipesilvacommented, Oct 16, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found