Vue: keep-alive include parameter is not worked with router-view

Created on 15 Sep 2017  路  4Comments  路  Source: vuejs/vue

Version

2.4.4

Reproduction link

https://jsfiddle.net/okjesse/k94fphsg/

Steps to reproduce

keep-alive include parameter is not worked with router-view

What is expected?

Home is not keep alived

What is actually happening?

home is keep alived

Most helpful comment

keep-alive include works on component names, not route names. Your Foo component doesn't have a name.

All 4 comments

keep-alive include works on component names, not route names. Your Foo component doesn't have a name.

It happens because you have not given Home component a name

https://jsfiddle.net/b9xk5rdw/

@sqal thank you,it's woks

Hi sqal,

In both the problem fiddle & your solution fiddle, both components have names,
const Home = { name: 'Home',
const Foo = { name: 'Foo'

so not sure when you say

It happens because you have not given Home component a name

Kindly clarify.

thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robertleeplummerjr picture robertleeplummerjr  路  3Comments

bfis picture bfis  路  3Comments

6pm picture 6pm  路  3Comments

hiendv picture hiendv  路  3Comments

bdedardel picture bdedardel  路  3Comments