Commit 59a1cde
Fix/ns views not cleaned on removal (#1740)
* fix(TemplatedItemsComponent): remove templates in ngOnDestroy()
* fix(PageRouterOutlet): Destroy the activated componentRef on ngOnDestroy()
* fix(NativeScriptRendererFactory): Empty the rootNgView when NativeScriptRendererFactory is destroyed
* fix(ViewUtil): ViewUtil.removeChild() doesn't remove the child recursively
* fix(NSLocationStrategy): remove outlets in ngOnDestroy()
Make sure outlets and currentOutlet are removed when the NSLocationStrategy
is destroyed.
* fix: PageRouterOutlet.ngOnDestroy logged as NSLocationStrategy.ngOnDestroy
* fix(ViewUtil): Removing FormattedString throw
When removing the children from a Label and one of these children is
a FormattedString, the FormattedTextProperty throw this exception:
"TypeError: Cannot read property 'textTransform' of undefined"
* fix: use ViewUtils to add Component to Page
Without this the Page and componentView doesn't get the proper relation
for then the page is destroyed.
* fix: Remove all the children from the AppHostView
* fix: ViewUtil.removeFromVisualTree logged under wrong name
* fix(PageRouterOutlet): Don't remove grandchild views when moving component
PageRouterOutlet.loadComponentInPage moves the componentView from its native parent,
to the Page. Don't remove the componentView's children when it is removed from the
native parent.
* fix: ViewUtils tried to remote Span elements from Labels
Just like with FormattedString this throws an exception
* chor: skip detached elements for removeFromVisualTree1 parent 9b144a4 commit 59a1cde
File tree
5 files changed
+67
-14
lines changed- nativescript-angular
- directives
- router
5 files changed
+67
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
103 | 108 | | |
104 | 109 | | |
105 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
76 | 86 | | |
77 | 87 | | |
78 | 88 | | |
| |||
129 | 139 | | |
130 | 140 | | |
131 | 141 | | |
132 | | - | |
| 142 | + | |
133 | 143 | | |
134 | 144 | | |
135 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
747 | 756 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
202 | 211 | | |
203 | 212 | | |
204 | 213 | | |
| |||
349 | 358 | | |
350 | 359 | | |
351 | 360 | | |
352 | | - | |
| 361 | + | |
353 | 362 | | |
354 | | - | |
| 363 | + | |
355 | 364 | | |
356 | 365 | | |
357 | 366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| |||
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
172 | 184 | | |
173 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
174 | 188 | | |
175 | 189 | | |
176 | 190 | | |
| |||
181 | 195 | | |
182 | 196 | | |
183 | 197 | | |
| 198 | + | |
184 | 199 | | |
185 | 200 | | |
186 | 201 | | |
| |||
196 | 211 | | |
197 | 212 | | |
198 | 213 | | |
| 214 | + | |
| 215 | + | |
199 | 216 | | |
200 | 217 | | |
201 | 218 | | |
| |||
240 | 257 | | |
241 | 258 | | |
242 | 259 | | |
243 | | - | |
| 260 | + | |
244 | 261 | | |
245 | 262 | | |
246 | 263 | | |
| |||
249 | 266 | | |
250 | 267 | | |
251 | 268 | | |
252 | | - | |
253 | | - | |
254 | 269 | | |
255 | 270 | | |
256 | 271 | | |
| |||
273 | 288 | | |
274 | 289 | | |
275 | 290 | | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
| 291 | + | |
280 | 292 | | |
281 | 293 | | |
282 | 294 | | |
283 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
284 | 300 | | |
285 | 301 | | |
286 | 302 | | |
| |||
300 | 316 | | |
301 | 317 | | |
302 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
303 | 323 | | |
304 | 324 | | |
305 | 325 | | |
| |||
0 commit comments