Nuxt/examples/with-keep-alive/README.md

16 lines
377 B
Markdown
Raw Normal View History

2018-01-17 08:48:51 +00:00
# `<keep-alive>` with Nuxt.js
2018-01-17 08:46:48 +00:00
Introduced in v1.2.0, you can add the `keep-alive` prop to `<Nuxt/>` or `<NuxtChild/>` to "keep alive" the pages.
2018-01-17 08:46:48 +00:00
`layouts/default.vue`:
```vue
<template>
<Nuxt keep-alive/>
2018-01-17 08:46:48 +00:00
</template>
```
2018-01-17 08:52:58 +00:00
Screenshot:
![screen shot 2018-01-17 at 09 42 47](https://user-images.githubusercontent.com/904724/35033642-b41ec51c-fb6b-11e7-87cf-5617ade32841.png)