Commit 8614cba
committed
feat(@angular/build): enable component template hot replacement by default
When using the `application` builder (default for new projects) with the
development server, component template only changes will now automatically
replace the template within the running application without a full reload
of the page. No application code changes are necessary and both file-based
(`templateUrl`) and inline (`template`) component templates are supported.
Additionally, changing a components styles in combination with a template
change is also supported for hot replacement. This includes both inline and
file-based changes.
If any issues are encountered or it is preferred to not hot replace component
templates, the `NG_HMR_TEMPLATES=0` environment variable can be used to disable
the feature. Setting the `liveReload` option or `hmr` option to false will
also disable all updates.1 parent 10a5b8b commit 8614cba
File tree
2 files changed
+6
-9
lines changed- packages/angular/build/src
- builders/dev-server
- utils
2 files changed
+6
-9
lines changedLines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
152 | 149 | | |
153 | 150 | | |
154 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
0 commit comments