Global Application State in Aurelia
问题 I'm trying to inject a class to other places in my Aurelia app to share authentication state after login. I'm following this example http://hobbit-on-aurelia.net/appstate/ but it looks like the scope is lost during transitions or they are independent instances. Aurelia's docs says: By default, the DI container assumes that everything is a singleton instance; When I set the router doing this.userSession.router = router from app instance, the userSession instance is not updated. this.loggedUser