Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$routeProvider - optional named group + trailing slash  #9742

Closed
@jirikuchta

Description

@jirikuchta

From $routeProvider documentation:

If $location.path contains redundant trailing slash or is missing one, the route will still match and the $location.path will be updated to add or drop the trailing slash to exactly match the route definition.

It seems this does not work as expected if there is an optional named group in route path definition (e.g. /page/:name?). In that case an encoded question mark will appear in the URL if you will navigate to /page/index/ (notice the trailing slash at the end).

You can test this issue in this plunkr.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions