0👍
The duplicate link helped me to understand the structure.
“Defined in ECMA Script 6, arrow-functions adopt the this binding from the enclosing (function or global) scope.”
so should be:
var vm = this;
Bus.$on('UpdateCartData', function (event) {
vm.cart = event.cart;
vm.cart_options = event.cart_options;
});
}
- [Vuejs]-Custom directive why does only the unbind hook get called?
- [Vuejs]-Why is self multiplying returning rediculously large number?
Source:stackexchange.com