I have an Angular application which consists of 2 components. The main one is a graph which plots data from a json file. Each 5s interval a new point is plotted.
My problem is that when I route to display the second component and then go back to the main one, all the data already plotted is cleared and the component starts from the begining again.
I have researched on the internet but I don't get a clear answer. Basically I want to avoid the main component to destroy on routing so It can continue ploting points (or at least have the same previous amount) even if the component is not displayed at the moment.
Is it possible?