Skip to content

keep-alive breaks v-ref on <router-view> #486

@te1

Description

@te1

Vue.js & vue-router.js version

1.0.18, 0.7.13

Reproduction Link

http://www.webpackbin.com/VJUv0eAl-

Steps to reproduce

Click on the "page 2" link and then click on the "page 1" link.

What is Expected?

It should say "current page is page 1". The text is bound to {{ $refs.page.name }} with <router-view v-ref:page keep-alive="true"></router-view> and name is part of the data for the page1 and page2 components.

What is actually happening?

The text disappears after switching back to page 1 because the v-ref on <router-view> is no longer respected. If you remove keep-alive it works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions