SOLUTION: The code I showed is okay, it was just a ‘‘hidden’’ error inside a previous promise that was causing this behavior.
Hi everyone, I’m building an Ionic2 app and I implemented a Geolocation Service (Provider) to get my position in realtime via an observable.
Here’s the code:
The ‘‘currentPosition$’’ variable is observed in 2 different places, but only one of them is receiving the data fired by next().
I discovered the ‘‘share()’’ operator of rxjs, I thought it was the solution, but it doesn’t work either.
So I don’t really understand the problem right now.
Any suggestion ?
Thanks.