Always Attach and Detach a Component instead of Destroying it

I’m working on an app that contains a map component and I don’t want it to be destroyed.
I found this link online (sorry it’s in Italian): Mantenere lo stato delle rotte con RouteReuseStrategy | AccademiaDev
I’ve already used that code in the past to keep components alive but I can’t get it to work with Ionic.

Does anyone know if this is possible?

Kind regards,
Nicolò