We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

In tab component,if its tab item content(<ng-template #content></ng-template>) contains another angular component,it renders and destroy the component even before actual rendering.

Thread ID:

Created:

Updated:

Platform:

Replies:

146596 Aug 9,2019 02:46 PM UTC Aug 19,2019 11:35 AM UTC Angular - EJ 2 1
loading
Tags: Tab
Goutham
Asked On August 9, 2019 02:46 PM UTC

Hi,

Tab component used like below shown.
ex):
 <ejs-tab >
          <e-tabitems >
            <e-tabitem [header]='headerText[0]' >
              <ng-template #content>
                <up-phone></up-phone>(inner component which we included)

if we tested with ngOnDestroy() method in phone component ,it is called even before destroying.

case where i got the problem:
we are trying to remove the dialog(ejs-dialog using id) element which is included in component(<up-phone>) using onDestroy method of component(<up-phone>).
It is giving error because of its calling mechanism.







Nevitha Ravi [Syncfusion]
Replied On August 19, 2019 11:35 AM UTC

Hi Goutham, 
 
Thanks for contacting Syncfusion support. 
 
We had checked your reported scenario at our end. Tab component is working properly while we render the dialog inside the tab as external component. When we destroy the tab component, before that we need to destroy the dialog component manually. ‘ngOnDestroy’ method is not invoked because we are destroying just tab component, not the angular component. When we destroy the angular component, in this case ‘ngOnDestroy’ method is invoked by default. The best example for destroying angular component is angular routing. While we switch from one component to another component the ‘ngOnDestroy’ method invokes properly. 

Kindly revert us, if we misunderstood your requirement or any other queries. 

Regards,  
Nevitha 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon