docs(elements): Add limitations section (#58194)

PR Close #58194
This commit is contained in:
Paul 2024-10-14 10:59:25 -07:00 committed by Andrew Kushnir
parent c829a1564e
commit c2927ba94c

View file

@ -157,3 +157,10 @@ document.createElement('my-dialog') //--> NgElement & WithProperties<{co
document.querySelector('my-other-element') //--> NgElement & WithProperties<{foo: 'bar'}> (custom element)
</docs-code>
## Limitations
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:
- Rendering a component in an `ng-if` or `ng-repeat` in `AngularJs`
- Manually detaching and re-attaching an element to the DOM