[v2] Back and load context sent

Hi guys, are there any way that the context that I’ve assigned to load the pages, save in memory ? because it get’s lost when I go back in multiples pages using class “back” in a link.
Let me explain better.
The page.routes.context is missing

Load page 0 without contect
Load page1 sending context.
Then load page2 without sending context
Then load page3 sending context

When I go from page3 to page2 it’s OK
When I go from page2 to page1 context (that I’ve used to load that page) is lost.

The problem I think is about the quantity pages in memory (2) , because when page2 is loaded it re-create in the DOM page1, without the context assigned in that moment.
Help!

If you passed it dynamically like

router.navigate('...', { context: ... })

Then no way to restore it. As a solution you can enable View’s stackPages parameter to keep previous pages in DOM. Or specify context in routes

1 Like

Thanks Vladimir! I’ll try this solution. Maybe you could evaluate to add it, in a next releases, this could be very useful.
Thanks again!

It was actually removed from v1 intentionally because it can easily cause memory leaks

oh, it has more logic.
Thanks again!!