title: Could the Vue app catch the child's emitted event in the js?
body: <p>I am the new to the Vuejs.<br>
  Normally <code>Vue</code> uses the <code>event</code> when sending data to the parent.<br>
  For example,  </p>
  
  <pre><code>Vue.component('child', {
   template: `
    &lt;div class="myitem"&gt;
       &lt;button v-on:click="senddata()"&gt;
          Send Data
       &lt;/button&gt;
   &lt;/div&gt;`,
     methods:{
        senddata:function(){
           this.$emit('data', 'testdata');
        }
     }
   })
  </code></pre>
  
  <p>And then by using 'child', in the parent component or app.</p>
  
  <pre><code>&lt;child v-on:data="eventHandler" ref="child"&gt;&lt;/child&gt;
  </code></pre>
  
  <p>In the parent methods , there is a <code>eventHandler</code> to process the data sent from child.<br>
  If the <code>child</code> component emits the event <code>data</code>, the <code>eventHandler</code> would be called.  </p>
  
  <pre><code>methods: {
      eventHandler: function (data) {
         console.log('received data: ' + data);   
      }
  }
  </code></pre>
  
  <p>This works well.<br>
  But I want to add the <code>eventHandler</code> in the code.  </p>
  
  <pre><code>this.$refs.child.data().then(function(data){
     //According to the data..., the app want to process data...
  
  });
  </code></pre>
  
  <p>The code like the above is possible?</p>