Skip to content

[@embroider/router] router.urlFor only works when a string is passed #2502

@andrew-paterson

Description

@andrew-paterson

When using @ember/routing/router as the router, the following pattern works as stated in the API docs:

this.router.urlFor('my-route, {id: 1});
// /my-route/1

After changing to @embroider/router to enable route splitting, this behaviour changes.

this.router.urlFor('my-route, {id: 1});
// /my-route/%5Bobject%20Object%5D

Passing a primitive value does work though:

this.router.urlFor('my-route, 1);
// /my-route/1

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