if keep-alive is specified to router-view as below
then all
https://jsfiddle.net/Linusborg/L613xva0/4/
New in Vue version 2.1.0, the include
and exclude
props for conditionally caching components. Note the use of the name
option.
const Foo = {
name: 'foo',
template: '{{ n }}
',
data: function() {
return {
numbers: [Math.round(Math.random() * 10), Math.round(Math.random() * 10)]
}
}
}
const Bar = {
name: 'bar',
template: '{{ n }}
',
data: function() {
return {
numbers: [Math.round(Math.random() * 10), Math.round(Math.random() * 10)]
}
}
}