-
-
Save imcodetolive/2b7ef6b10ac7209b4eea12d4e5d9811d to your computer and use it in GitHub Desktop.
eventbus-advanced-prototype.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a global Event Bus | |
var EventBus = new Vue() | |
// Add to Vue properties by exposing a getter for $bus | |
Object.defineProperties(Vue.prototype, { | |
$bus: { | |
get: function () { | |
return EventBus; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment