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. Image for the cookie policy date

items of tool bar not removed from DOM after destroying toolbar component where items of toolbar are rendered via template prop(id is attached to template property))

 We have used toolbar component ,and item of toolbar are rendered using template property(id of element is given as value) as shown below.

Html part:

Ts file part:

Why i used this type of rendering:
Using this type configuration,we are showing/hiding toolbar items dynamically depends upon logic.
Every time ,we navigated away from  route which containing toolbar,the items are appended to DOM ,not removed from DOM when route (component which containing toolbar ) is destroyed.

Thank you.

1 Reply

KK Karthigeyan Krishnamurthi Syncfusion Team August 13, 2019 09:30 AM UTC

Hi Goutham, 
Syncfusion greetings. 
Kindly use ng-template option to achieve your requirement and the below sample is made for your reference.