I have a need. I have a page that get an image from device storage, gallery or camera. That page is called by another 3 pages and it save the image using Capacitor Storage. My problem is inform the caller page that the image was saved.
Thanks in advance
Use a service that is injected by both pages.
Thanks a lot. It works as I need
I’m sorry again. I am newbe with ionic. I can’t not make this works; maybe I don’t understand you. I have two pages, page1 calls page2, page2 use camera for taking a photo or load the photo from the device. How can page2 say to page1 that the photo is loaded. I save the photo on the storage. I need to page2 say page1 the photo is loaded then page1 can use and erase the photo.
I tried with Events but is deprecated, and I am not understand the whole observable theme.
You can use subject or behaviorSubject from rxjs to trigger an change to other pages
input and output parent-child communication
Communicate with child with ViewChild Note: child selector must be on parent html
communicate with subject or behaviorSubject across component
I use event emitter from angular
u can refer to this article for example