Guest User

Untitled

a guest
Aug 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. // main.js
  2. Vue.config.errorHandler = function (err) {
  3. console.warn(err.message) //
  4. }
  5.  
  6. // App.vue
  7. <template>
  8. // ...
  9. <button @click="login">Login</button>
  10. </template>
  11.  
  12. <script>
  13. // ...
  14. @Component
  15. export default class App extends Vue {
  16. created() {
  17. throw new Error('Error during component creation')
  18. }
  19.  
  20. async login() {
  21. const token = await api.loginUser(this.email, this.password)
  22. // ...
  23. }
  24. }
  25. </script>
Add Comment
Please, Sign In to add comment