Tomas Marik
Tomas Marik

Reputation: 4093

Angular CLI: Can't change base in index.html

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.

Upvotes: 0

Views: 2328

Answers (1)

JB Nizet
JB Nizet

Reputation: 691973

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

Upvotes: 1

Related Questions