Single page object


#1

Hi
As I saw while using ion-tabs constructor for ion-tab(page) called only once means that it is using the same instance of page again and again while traversing with tabs.

Similarly I want to give Chat option button in header and when user will click it page for chat as a modal will open, but problem is each time user clicks on button modal appears but past conversation message get erased and also notice that each time constructor of modal page is calling.

Please help to overcome this problem Or suggest me approach to implement this. :slight_smile:


#2

What about:


#3

Very nice… but it is not what I am looking for.
Thanks :slight_smile:


#4

Store the chat data in a provider. I store messages (including mailbox etc) using Redux (ngrx/store). You don’t need all that, but if you’re saving lots of different chats, it might be worth it. In any case, when your modal opens, it gets the most recent chat data from the provider. Store nothing in the pages themselves.