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

Query Params and Route matching #176

Open
@kamrenz

Description

@kamrenz

Is there a way for us to specify in our router.config query parameters?
I would like to hit something like the following URL

#/information/42/wisdom?isUser='car'

If I map my router like the following my information controller get's triggered, but the $routeParams only has {id: 42, type: 'wisdom'}. No isUser property is in the object.

  $router.config([
    { path: '/information/:id/:type', component: 'information' }
  ]);

If I map my router like the following my information controller get's triggered, but the $routeParams has {id: "42", type?isUser: "wisdom"}. The type and isUser properties are not separated and still no query parameter

  $router.config([
    { path: '/information/:id/:type?isUser', component: 'information' }    
  ]);

If I map my router like the following my information controller doesn't get triggered.

  $router.config([
    { path: '/information/:id/:type?isUser', component: 'information' }    
  ]);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions