Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49526

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.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49526

Trending Articles