Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created April 2, 2018 12:47
Show Gist options
  • Save matthieu-D/92b6177a29f5b078c94e85c481c813e9 to your computer and use it in GitHub Desktop.
Save matthieu-D/92b6177a29f5b078c94e85c481c813e9 to your computer and use it in GitHub Desktop.
const Contact = {
props: ["id"],
template: "<div>Contact view</div>",
mounted: function() {
console.log("Welcome to the Contact view");
const userId = this.id;
if (userId) {
console.log("You are viewing the user", userId);
}
},
destroyed: function() {
console.log("Thanks for visiting to the Contact view");
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment