0

I have Angular 2 app generated by Angular CLI tool.

When I change base to any value in index.html:

<base href="test">

and build the app (ng build) the resulted index.html has:

<base href="/">

So my question is: How can I change base in index.html?

Thanks for any help.

2
  • The base URL is used to resolve relative URLs in the page. Making the base URL relative as well does not make any sense. What do you want to achieve? Commented May 7, 2017 at 9:57
  • When building the electron app the base has to by changed to "./" value. Commented May 7, 2017 at 10:05

1 Answer 1

1

Use the --base-href option on ng build. https://github.com/angular/angular-cli/wiki/build

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.