Paul Horn
Paul Horn

Reputation: 91

How can I use <keep-alive> in Nuxt.js?

I am using Video.js in my Nuxt.js project but I don't want the video to start over again from beginning when I change the view of the application. Due to that it would be good to use the tags on the tag.

Upvotes: 9

Views: 17771

Answers (2)

Denis Ilchishin
Denis Ilchishin

Reputation: 191

For those who want to pass props to keep-alive, something like this should do the trick:

<template>
    <nuxt keep-alive :keep-alive-props="{include: ['name_of_component']}" />
</template>

Upvotes: 10

Related Questions