title: How to call methods in App.vue from the vue components
body: <p>I have a vue component and a vue element declaration as given below</p>
  <pre><code>Vue.component('todo-item', {
      template: '&lt;li&gt;This is a todo&lt;/li&gt;'
      methods: {
          test: function() {
              
              // I am getting an error here
              app.aNewFunction();
          }
      }
  })
  
  var app = new Vue({
      el: '#app',
      data: {
          message: 'Hello Vue!'
      },
      methods: {
          aNewFunction: function() {
              alert(&quot;inside&quot;);
          }
      }
  }) 
  </code></pre>
  <p>How to call a method in vue app from the vue component?</p>