The testMethod has to be moved from the root instance to the component. In other words, add the following to your test.vue file:

    export default {
        methods: {
            testMethod() {
               console.log("I did something yay!!");
  • I changed the testMethod declaration to ES6 syntax :) It's not a must, so you can bring it back if you are not comfortable with ES6.

Return to Thread...