Skip to content

Advanced components not work in vue-router #1767

Closed
@dimensi

Description

@dimensi

Version

Vue-router 2.7.0
Vue 2.4.4

Reproduction link

https://codesandbox.io/s/5zyw568ojk

Steps to reproduce

  1. create route
  2. add in component property, arrow func with object
() => ({
      component: import('./components/Calendar/Calendar.vue'),
      loading: PageLoader,
    })
  1. change network speed in devtools

What is expected?

I expect to see my component loader while the async component is loading

What is actually happening?

The loading component is not shown and the route is not changed until the async component loads.

Comments

https://vuejs.org/v2/guide/components.html#Advanced-Async-Components

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