Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

vue.js

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.

like image 791
Paul Horn Avatar asked Aug 16 '19 22:08

Paul Horn


1 Answers

layout/default.vue

<template>
  <nuxt keep-alive/>
</template>

References:

  • https://github.com/nuxt/nuxt.js/tree/dev/examples/with-keep-alive
  • https://github.com/nuxt/nuxt.js/releases/tag/v1.2.0
  • https://nuxtjs.org/api/components-nuxt-child/
like image 199
dyanagi Avatar answered Sep 18 '22 00:09

dyanagi