Independent parallel history for each sidemenu

Hi all! I understand each ionic tab has a separate history. I would like to obtain the same effect for ionic sidemenu: that is, I need to perform navigation within a sidemenu, and I do not want that navigation to affect main content or the other sidemenu. Note that the history should be persistent for each side menu: that is, when I close a side menu and open it again, I would like to go back to the state where I left.

I spent a few days trying to understand how to do this, but the ionic documentation is very sparse, and also looking at the source code did not help too much.