|
|
|
|
|
by matmo
2934 days ago
|
|
If you use a CI system that deploys each build of your webapp, where it might be deployed at a random url (<domain>/build1/index.html vs. <domain>/build2/index.html), then you would make all the url's in your app relative urls, which are then basically prefixed by the base url specified in the document head once the actual requests get sent. You can then write a different base href onto the document for each build, and everything will magically work. Also, if ever use relative urls for assets or requests, and you deploy to different URL's (or your deployed URL path's don't map 1:1 to your filesystem paths), it can come in handy. Angular also uses this to determine where the client side routing begins - https://angular.io/guide/deployment#base-tag . |
|