Viewer clone / resuse the old viewer.

I hope maybe someone gets this situation too and can help me with this.

I have angular 7 APP, that working with routes.
I had cesium in the main page that I can add some entities one him.
the case is like that.
I want that, when I navigate to another page and goes back to the main page I will can to display the same viewer as before with some additional entities that I added form the other page.
How can I go back to the same cesium viewer?
I tried to save the viewer on service and return him back / I tried to clone the old viewer but nothing help.
I just can to get a new one.

any help will be blessed!

What happens when you try to save and re-use the old viewer? Is your app destroying/removing the canvas? If you can save that too, I think it should work.

When I tried to reuse the old viewer, that stored in service and still exist, I didn’t get any error.
My app activates this component (page) from start hence it removing the component and builds it again.
How can I save just the canvas?

‫בתאריך יום ד׳, 27 בפבר׳ 2019 ב-1:54 מאת ‪Omar Shehata‬‏ <‪omar.sameh.shehata@gmail.com‬‏>:‬

I think that depends on exactly what your component is doing/how Angular handles activating and deactivating. From a cursory search it looks like you might be able to override this to get it to re-use a component:

sorry for the delay, working like a charm! thank you very much!

‫בתאריך יום ה׳, 28 בפבר׳ 2019 ב-14:34 מאת ‪Omar Shehata‬‏ <‪omar.sameh.shehata@gmail.com‬‏>:‬