Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.
This repository was archived by the owner on Jan 29, 2026. It is now read-only.

Asterisk is too greedy in route matching #117

@thorn0

Description

@thorn0

Can't figure out how I should configure states/routes to get what I need.

I need that URLs like folder1/filename, folder1/folder2/filename be matched to one state (say file), and URLs like folder1/filename/EDIT, folder1/folder2/filename/EDIT to another (file.edit). As it might include any number of folders, I use a parameter with asterisk to match the folders and file name:

$stateProvider.state('file', { route: '{*path}' });

But then, I can't configure the file.edit state:

$stateProvider.state('file.edit', { route: '/EDIT' });

It doesn't work as /EDIT becomes part of the path parameter. Can something be done here? Can the asterisk be less greedy?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions