`--base-href` to be configurable in `.angular-cli.json`
See original GitHub issueBug Report or Feature Request (mark with an x)
- [ ] bug report -> please search issues before submitting
- [x] feature request
Versions.
@angular/cli: 1.0.2
node: 6.9.4
os: linux x64
@angular/animations: 4.1.1
@angular/common: 4.1.1
@angular/compiler: 4.1.1
@angular/core: 4.1.1
@angular/forms: 4.1.1
@angular/http: 4.1.1
@angular/platform-browser: 4.1.1
@angular/platform-browser-dynamic: 4.1.1
@angular/platform-server: 4.1.1
@angular/router: 4.1.1
@angular/cli: 1.0.2
@angular/compiler-cli: 4.1.1
@angular/language-service: 4.1.1
Desired functionality.
I need to configure multiple apps with different --base-href values. Right now the only place where I can set this setting is via command line, but that leads to too complex NPM scripts. A better solution would be a setting inside the app array of .angular-cli.json. We already have deployUrl, so I don’t understand why there is no baseHref yet.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:19
- Comments:8 (1 by maintainers)
Top Results From Across the Web
override baseHref for ng serve in Angular 14 - Stack Overflow
I have a set "baseHref" to '/bui' in the angular.json file because the static files are deployed there. If I use ng serve...
Read more >baseHref setting in angular.json - Ionic Forum
Is there an easy way for me to configure things so that I can get things working across all three platforms with a...
Read more >angular-cli-ghpages - Google Dev Library | What will you build?
Deploy your Angular app to GitHub pages directly from the Angular CLI! ... NPM package and add the necessary deploy configuration to your...
Read more >How to make Angular CLI built app work from a subfolder
There are 2 possible solutions - use the CLI parameter, or set the value in the angular.json file. CLI parameter. angular build accepts...
Read more >.angular-cli.json XML Schema Documentation
JSON Schema Diagram of /properties/apps/items[0] ... baseHref, string, A String value ... The name of the TypeScript configuration file for unit tests.
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

just add “baseHref” : “YOUR_CUSTOM_HREF” to the “apps” in the angular-cli.json
Thanks!
I’ve just noticed, #3010 already considered this feature, but then got dismissed due to the last comment realizing that it is enough to change the base href in the
index.html. However, when multiple app configurations are needed, editingindex.htmlis no longer a practical solution.