dependency injection - How can I write to a global variable in Aurelia? -


i'm writing aurelia application , have registered instance of class inside aurelia container. now, when authenticate user, instance has modified. how modify original instance anywhere in code?

how modify original instance anywhere in code

best put instance in module. , expose functions modify instance. e.g.

let foo = {}  export function getfoo(){return foo} export function setfoo(bar){ /* */}