0

When i load angular-elements first time everything is working fine all the material drop downs and tooltips working fine. when we close the angular app we are doing below,

below is how it loads:

<div id="angular-app">
    <angular-element></angular-element>
</div>

when closing: document.getElementById('angular-app').remove();

This is what we are doing and when launch again we are creating the angular-element again but second time load app is loading but none of the angular material functionalities are working.

Please suggest how to destroy properly and load again.

Madhu N
  • 11
  • 2

1 Answers1

0

A more proper way to handle an Angular component behaviour is to use lifecycle hooks. Consider using ngOnInit() and ngOnDestroy() methods to properly handle your angular-element as shows the diagram in this reply