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
Copy file name to clipboardExpand all lines: README.md
+19-5
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Prototype of a CLI for Angular 2 applications based on the [ember-cli](http://ww
13
13
14
14
This project is very much still a work in progress.
15
15
16
-
The CLI is now in beta.
16
+
The CLI is now in beta.
17
17
If you wish to collaborate while the project is still young, check out [our issue list](https://github.com/angular/angular-cli/issues).
18
18
19
19
## Prerequisites
@@ -114,12 +114,12 @@ The build artifacts will be stored in the `dist/` directory.
114
114
115
115
### Build Targets and Environment Files
116
116
117
-
A build can specify both a build target (`development` or `production`) and an
118
-
environment file to be used with that build. By default, the development build
117
+
A build can specify both a build target (`development` or `production`) and an
118
+
environment file to be used with that build. By default, the development build
119
119
target is used.
120
120
121
121
At build time, `src/app/environments/environment.ts` will be replaced by
122
-
`src/app/environments/environment.{NAME}.ts` where `NAME` is the argument
122
+
`src/app/environments/environment.{NAME}.ts` where `NAME` is the argument
123
123
provided to the `--environment` flag.
124
124
125
125
These options also apply to the serve command. If you do not pass a value for `environment`,
@@ -141,6 +141,20 @@ You can also add your own env files other than `dev` and `prod` by creating a
141
141
`src/app/environments/environment.{NAME}.ts` and use them by using the `--env=NAME`
142
142
flag on the build/serve commands.
143
143
144
+
### Base tag handling in index.html
145
+
146
+
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.
147
+
148
+
```bash
149
+
# Sets base tag href to /myUrl/ in your index.html
150
+
ng build --base-href /myUrl/
151
+
ng serve --base-href /myUrl/
152
+
153
+
# Does nothing
154
+
ng build --base-href
155
+
ng serve --base-href
156
+
```
157
+
144
158
### Bundling
145
159
146
160
Builds created with the `-prod` flag via `ng build -prod` or `ng serve -prod` bundle
@@ -299,7 +313,7 @@ Running `ng init` will check for changes in all the auto-generated files created
299
313
300
314
Carefully read the diffs for each code file, and either accept the changes or incorporate them manually after `ng init` finishes.
301
315
302
-
**The main cause of errors after an update is failing to incorporate these updates into your code**.
316
+
**The main cause of errors after an update is failing to incorporate these updates into your code**.
303
317
304
318
You can find more details about changes between versions in [CHANGELOG.md](https://github.com/angular/angular-cli/blob/master/CHANGELOG.md).
0 commit comments