How to create a singleton service in Aurelia? -


i'm pretty new aurelia (only been using few days) , love it!

i know how make service aurelia, how can make service singleton can share data between multiple viewmodels?

thanks

just inject it

by default, di container assumes singleton instance; 1 instance app. however, can use registration decorator change this.


Comments

Popular posts from this blog

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - On Gitbash - Bower : ENOGIT git is not installed or not in the PATH -