Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70440

Ionic 5 service singleton?

$
0
0

Hi,

In my ionic app, i have a service that has an instance of a websocket, in the constructor method, i create the socket and pass the reference to it to the pages that need it, Aren’t services supposed to be singleton? as i’m getting multiple instances of the sockets as i navigate between pages.

Also for this page i’ve set ViewEncapsulation to None if it makes any difference.

6 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 70440

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>