Skip to content

Commit 241416e

Browse files
pcvonzAndrewKushnir
authored andcommitted
docs(elements): Add limitations section (angular#58194)
PR Close angular#58194
1 parent 2f5f898 commit 241416e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

adev/src/content/guide/elements.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,10 @@ document.createElement('my-dialog') //--> NgElement & WithProperties<{co
157157
document.querySelector('my-other-element') //--> NgElement & WithProperties<{foo: 'bar'}> (custom element)
158158

159159
</docs-code>
160+
161+
## Limitations
162+
163+
Care should be taken when destroying and then re-attaching custom elements created with `@angular/elements` due to issues with the [disconnect()](https://github.com/angular/angular/issues/38778) callback. Cases where you may run into this issue are:
164+
165+
- Rendering a component in an `ng-if` or `ng-repeat` in `AngularJs`
166+
- Manually detaching and re-attaching an element to the DOM

0 commit comments

Comments
 (0)