Check location without leaving page

I have a firebase app that uses location. the check for location happens when you enter the page.

This works for the main part, but if you land on the page with your location off, and then turn it on, you have to leave the page and come back to load the content. This is a poor UX, and doesn’t make it clear. is there a way of detecting the change without reloading the page?

i’ve tried to google it but i’m not really sure what i’m looking for

thanks

That’s not when I would do it. I would expose an Observable indicating the state of the location setting in a service, inject that service anywhere that cares, subscribe to the Observable, and react accordingly in that subscription.

That makes sense. It’s not something I’m familiar with, but I know where to start now. Thanks for your help