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

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

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

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