Skip to content

Setting root to '/' throws an "Invalid regular expression" error #379

@agonbina

Description

@agonbina

I want to set the root to / so that the activeClassName is set properly for nested routes within the root(because currently if you have a route definition for /, and then other routes starting with /, ex: /cats and you navigate to /cats, both anchors to / and /cats will have the active class), but I get this exception thrown:

Invalid regular expression: /^\/: \ at end of pattern

being thrown by this line: https://github.com/vuejs/vue-router/blob/dev/src/history/html5.js#L14

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