Skip to content

--base-href to be configurable in .angular-cli.json #6477

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

Closed
rkrisztian opened this issue May 26, 2017 · 8 comments
Closed

--base-href to be configurable in .angular-cli.json #6477

rkrisztian opened this issue May 26, 2017 · 8 comments
Labels
effort1: easy (hours) feature Issue that requests a new feature P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@rkrisztian
Copy link

Bug 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.

@sumitarora sumitarora self-assigned this May 26, 2017
@mhartvig
Copy link

You have my vote, looking for exactly the same feature.

@clydin
Copy link
Member

clydin commented May 26, 2017

There's a pending PR: #6461

@rkrisztian
Copy link
Author

rkrisztian commented May 27, 2017

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, editing index.html is no longer a practical solution.

@filipesilva filipesilva added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Jun 1, 2017
@aboudard
Copy link

Would love to see that feature !

@spieIbug
Copy link

just add "baseHref" : "YOUR_CUSTOM_HREF" to the "apps" in the angular-cli.json

{
   ....
 "apps": [
    {
       "baseHref" : "YOUR_CUSTOM_HREF"
     }
  ],
}

@ffMathy
Copy link

ffMathy commented Jun 14, 2018

How does this work in Angular 6 with the new angular.json file?

@StevenWiz
Copy link

@ffMathy

It's more or less the same way. In your angular.json file:

Build -> Configurations -> YOUR_CONFIG -> "baseHref" : "YOUR_CUSTOM_HREF"

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort1: easy (hours) feature Issue that requests a new feature P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests

9 participants