changing data of the page from the layout



  • I would like to know, if it’s possible, how to modify data on a page from the layout. For example, I’ve got an array of elements in a page data object and I would want remove this elements from a button in the layout. I’ve got it putting this button on the same page, but I wanted to work with a button in the layout.



  • @jmg1340
    I’ve got it substituing the router-view (in the layout) by the content of the page template. Then, move the content of the page data object to the layout data object. And move the content of the page style tag to the layout style tag.

    Would it be right?


  • Admin

    Use Vuex.