You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -141,6 +142,20 @@ You can also add your own env files other than `dev` and `prod` by creating a
141
142
`src/app/environments/environment.{NAME}.ts` and use them by using the `--env=NAME`
142
143
flag on the build/serve commands.
143
144
145
+
### Base tag handling in index.html
146
+
147
+
You can modify base tag (`<base href="/">`) in your index.html by using `--base-href your-url` option. It's useful when building or serving for different environments.
148
+
149
+
```bash
150
+
# Sets base tag href to /myUrl/ in your index.html
151
+
ng build --base-href /myUrl/
152
+
ng serve --base-href /myUrl/
153
+
154
+
# Does nothing
155
+
ng build --base-href
156
+
ng serve --base-href
157
+
```
158
+
144
159
### Bundling
145
160
146
161
Builds created with the `-prod` flag via `ng build -prod` or `ng serve -prod` bundle
0 commit comments