Skip to content

Autoscroll to fragment #2776

@innovate-invent

Description

@innovate-invent

What problem does this feature solve?

Currently there is no way to navigate to a page fragment. I propose an autoscroll feature that can be specified in the router config to navigate to a page anchor.
It would also be good to support XPath references and the ability to automatically assign a class attribute to the target.

What does the proposed API look like?

extend the routes path to allow a octothorpe:

const router = new VueRouter({
    routes: [
      { path: '/about#staff', component: MyComponent, name: "About", target_class="page_target"},

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