[Vuejs]-Vue – How to pass data to child component after route is entered

0👍

If the History component needs it for creating itself, then you should defer creation of the component (with v-if) until cData is ready. cData should be declared upfront in the data object with value null.

You’re also doing this.cData in the template but it should be just cData.

<History v-if="cData" :data="cData" />

Leave a comment