Skip to content

Integer/Float URL Parameters, Maintain Type #246

@rynz

Description

@rynz

Consider a state which has url: '/example/{exampleId:[0-9]}' and that we navigate our application to /example/5.

Inspecting $stateParams the result is {exampleId: "0"} and thus exampleId is a string. If we later use this result to perform ajax queries or other operations we may run into a few issues and have to convert the string at the client or server side.

Perhaps $stateParams could check if the value is an integer/float and store it as such, else store as string? Or have a an additional option within the url:{} param to determine if it is to be stored as a string or not?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions