I’m trying to disable the history in my ion-nav’s stack, and I saw that the only way to do it is by removing the previous indexes. Am I right?
Right now I have it implemented in a very manual way, as I’m just doing
removeIndex(2) (as the index 1 is the root page), because I cannot get the active index via
getActive(), as it returns a Promise and I don’t know how to obtain the current index from it.
Besides, I’ve noticed that the removed views “remain” somehow alive, because in the ion-nav stack I can see as many div’s as views the stack has had, apart from the active one. I attach an image so you can see the behaviour:
What is the explanation of this behaviour? Does anyone know the best way to only have the active view in the stack?
Thank you in advance!