Basically, I have two components page1 and page2 and I would like to draw a google Gantt chart on the second page. However, when switching to page2 nothing is rendered.
From what I understand you must load google chart inside the <head>
element of index.html file, but because the container that should render the chart inside my component page2 is hidden at the start, google chart cannot find render it.
I have tried moving the google chart script to the html file of page2 but still no result.
Making page1 the container works but as soon as I switch pages it disappears when switching back to page1.
Here is my stackblitz with the code: https://stackblitz.com/edit/angular-button-routerlink-xglnar?file=src/index.html
Is there a way to work around that? Thank you!