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
Post a Comment