We have used toolbar component ,and item of toolbar are rendered using template property(id of element is given as value) as shown below.
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.