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

How to add other components to the panel

I need to be able to add other components in the panels, and I need to know if it is possible. 

When I change the content variable in the AddPanel() method and put for example the "Content" component (<app-content>) it does not appear in the interface.


Attachment: Captura_d480cb79.zip

1 Reply

LD LeoLavanya Dhanaraj Syncfusion Team May 8, 2023 03:12 PM UTC

Hi Adrian,


Greetings from Syncfusion support.


Based on the screenshot you shared, we understand that you have attempted to render a custom component dynamically through the content template. However, we do not have support for the dynamic rendering of custom components through the content template property in the Dashboard Layout component. This is because the content property is of the string type and therefore cannot be parsed as it is directly rendered as an HTML element. To dynamically add panels with components, you can specify the corresponding HTML elements in the custom component.


We have discussed a similar case of dynamic component rendering inside the panels in the forums mentioned below.


https://www.syncfusion.com/forums/143917/content-of-the-panel

https://www.syncfusion.com/forums/147712/inserting-dynamic-component-panels-on-the-dashboard

https://www.syncfusion.com/forums/173731/how-to-render-dynamically-multiple-components-on-the-dashboard-layout-in-angular?reply=SfZyP9

https://www.syncfusion.com/kb/13688/render-syncfusion-angular-components-as-dynamic-content-in-dashboard-layout


Follow the suggested way as mentioned in the forum and get back to us if you need any further assistance.


Loader.
Up arrow icon