how to reuse es6 class in vue js?
问题 How to reuse some existing ES6 classes in Vue Js. Have a class which has a variable being updated by observable. class A { public a: string; someobservable.subscribe((a) =>{ this.a = a; }) } In vue.JS have created the object of this class. Sample how property is been used: created: { objA = new A(); } methods: { getA() { if(this.objA !== undefined){ return objA.a; } } } and in vue template: <div>{{getA()}}</div> The value in template gets out of sync with value of variable in class. Is there