title: Passing data from Child component to Parent component in a wizard -VueJs
body: <p>I'm working on a wizard and here's the 3rd step of the wizard,</p>
  <pre><code>if(this.currentstep == 3){
                  var data = this.$parent.permit_info
                   axios.post('/customer/project-info/'+this.currentstep,data)
                  .then((response) =&gt; {
                      this.$parent.permit_info.id = response.data.id
                  })
  </code></pre>
  <p>The <code>permit_info</code> data object is in the 'create.vue' component like this,</p>
  <pre><code>data(){
    return{
        permit_info:{
                  id:null,
                  projectType:null,
                  p_type:'',
                    
              },
    }
  }
  </code></pre>
  <p>Also form 'create.vue' I have created another child component . And in there I have several data objects like,</p>
  <pre><code>data(){
              return{
                  mep:{
                    selectedOAAMep: [], 
                    mepTIBMech: '',
                    mepTIElec: '',
                    mepTIPlumb: '',
  
                },
  
                poolspa:{
                    selected: '', 
                    selectedSpa: [],
                    selectedOAAPoolspa: [],
            }
          }
  </code></pre>
  <p>I want to pass child data objects to the <code>permit_info</code> in order to save them from controller. It's bit confusing for me. I've done props. But in a wizrd I would like to get some help on <code>$emit</code>. Thanks</p>