Yes that’s correct, I don’t know why that got placed in there, because as I am looking at my code it has always been Constructor(private modalCtrl: ModalController){} Updated original post to reflect.
openChat() because I have a Triangle, of sorts for this situation. I have a ‘home’ screen and from there you can click on a profile that calls the this.modalService.openProfile() from there you see the other person’s profile. While you are there you have the option of clicking ‘Send Message’ which calls the this.modalService.openChat() then when you are in the chat, you see their avatar in the top right hand corner which if you click calls the this.modalService.openProfile() Which makes it circular… What I think I have to do is somehow monitor HOW they got there so that way when they click on the avatar that calls this.modalService.openProfile() instead of calling that it just dismisses the ChatComponent and brings them back to the ProfileComponent
but that’s where it gets more complicated The app has a HomePage and a ChatDashboardPage and you can see a list of all your active chats, then there you can click on a conversation that calls this.modalServer.openChat() and then then from there you guessed it you can click on the avatar that calls this.modalService.openProfile() so there are two ways to potentially enter this cycle jaajaja
What I ended up doing is pass a boolean as a second argument and have the avatar, for example, either dismiss the modal or open up the chat modal. It is still circular, however, I have a guard that prevents the circle from completing, I think I will need to refactor it to what you said as a page than a modal