Created
June 29, 2018 14:11
-
-
Save bertoni/d3f5dea075f85e477cf90622fcc617ff to your computer and use it in GitHub Desktop.
Forte acoplamento vue
This file contains hidden or 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
<template>...</template> | |
<script> | |
export default { | |
name: 'SomeComponent', | |
methods: { | |
remove () { | |
this.$store.dispatch('removeSomething', this.id) | |
.then(() => { | |
/* Some implementation for success case */ | |
}) | |
.catch(error => { | |
/* Some implementation for fail case */ | |
}) | |
}, | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment