Skip to content
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

[BUG] CLI overwrites base href by default #4340

Closed
danielsogl opened this issue Feb 2, 2017 · 4 comments · Fixed by #4489
Closed

[BUG] CLI overwrites base href by default #4340

danielsogl opened this issue Feb 2, 2017 · 4 comments · Fixed by #4489
Labels
effort1: easy (hours) P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix

Comments

@danielsogl
Copy link
Contributor

danielsogl commented Feb 2, 2017

Please provide us with the following information:

Since beta 28.3, when i use ng build or ng build --prod , the CLI automaticly overwrites the index.html base href path to ''
I don't want to use now --bh in every build step.

Update: I also have this problem in Beta 29

By default, the CLI shouldn't override the base href path.

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Windows 7

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.28.3
node: 6.9.4
os: win32 x64
@angular/common: 2.4.5
@angular/compiler: 2.4.5
@angular/compiler-cli: 2.4.5
@angular/core: 2.4.5
@angular/forms: 2.4.5
@angular/http: 2.4.5
@angular/platform-browser: 2.4.5
@angular/platform-browser-dynamic: 2.4.5
@angular/router: 3.4.5

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

Updated angular-cli from beta 26 to beta 28.3


Thanks! We'll be in touch soon.

@kevfuzz
Copy link

kevfuzz commented Feb 2, 2017

I have the exact same problem. Just updated from 26 to 28 and now my base href in the index.html is ignored.

@medeirosrich
Copy link

Same problem

@speige
Copy link

speige commented Feb 3, 2017

This seems partially caused by commit e15433e

A change in build.ts
--old
{ name: 'base-href', type: String, default: null, aliases: ['bh'] },
--new
{ name: 'base-href', type: String, default: '/', aliases: ['bh'] },

@filipesilva filipesilva added P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix command: build labels Feb 3, 2017
@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort1: easy (hours) P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants