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

php - Hide output during test execution -

javascript - Migrate custom AngularJS filter from 1.2.28 to 1.4.x -

Update Magento products with multiple images -