I have created a component using chessboardjs. Chessboardjs needs a div with given id, in-order to create a board, when i put the board in an inactive tab of the mat-tab, then the div with given id is not found and as a result the board is not constructed, so when user clicks on the inactive tab, the board is not shown. To counter this I tried using setTimeout in while loop, but due to it’s async nature, it doesn’t work, infact it hangs the system itself.
So The question is:
Is there a way to restore the component when it becomes visible in angular?