Questions tagged [routeparams]
126 questions
207
votes
9 answers
How to get the url parameters using AngularJS
HTML source code
$location.url() = {{$location.url()}}
$location.search() = {{$location.search('keyword')}}
…
$location.url() = {{$location.url()}}
$location.search() = {{$location.search('keyword')}}
…

praveenpds
- 2,936
- 5
- 26
- 43
32
votes
7 answers
Pass invisible or hidden parameters using routerLink Angular
I have router link like below:

Sai M.
- 2,548
- 4
- 29
- 46
13
votes
2 answers
Use route parameters with `app.use` on Express
I cannot use route parameters with app.use on Express 4.16.2.
I have a statement like this:
app.use('/course-sessions/:courseSessionId/chapter-sessions', chapterSessionsRouter)
And, in chapter sessions router:
// Index.
router.get('/',…

ismailarilik
- 2,236
- 2
- 26
- 37
7
votes
2 answers
How to get nested URL query in Nest.js
I have NestJS application I have to get the query from the URL. Problem is that my creationDate is an object and I can't get it as the nested object via @Query.
Here is example of the…

LaCodeM
- 645
- 7
- 23
6
votes
4 answers
Getting route param as null in angular 7
I am unable to retrive the route param as null. I am using angular7.
Please find the code below
HeaderComponent ts file
import {Router, ActivatedRoute} from '@angular/router';
constructor(private httpService: HttpClient, private router:…

Madhavi
- 474
- 2
- 7
- 20
4
votes
1 answer
Postman Mock server route params
there is a problem in using postman mock server. It does not respond to the requests that have route parameters. For example, My uri looks like this:
PUT : {{server_url}}/order/{id}
But when I call mock server in this…

Majid Akbari
- 190
- 2
- 10
4
votes
2 answers
Cannot read property 'params' of undefined in angular 2
We have used route param in our code. But while performing unit testing in jasmine karma we are getting following error.
TypeError: Cannot read property 'params' of undefined
TypeError: Cannot read property 'params' of undefined
at…

Partha Sarathi Ghosh
- 10,936
- 20
- 59
- 84
3
votes
1 answer
Getting page params in context="module" on Sveltekit
How to access to the page params in context="module" and using {#await load()} blocks?
If I do NOT use {#await load()} block I don't get error and page works correctly, but if I use Await block I get this error:
*Cannot read properties of undefined…

Sarah Diba
- 87
- 1
- 9
3
votes
1 answer
How to get path's parameters in url's breadcrumb in Vue.js
I'm working with Vue
In my app's router, I'd like to use path's get parameters in breadcrumb's URL.
I'd like to do something like this :
{
path: 'pages/gestion/region/:reg',
name: 'gestion-depa',
component: () =>…

gassddr
- 33
- 3
3
votes
2 answers
Vue.JS routing with optional parameters and in any order
I'd like to have query parameters in my Vue.JS application using vue-router like this:
http://localhost:8080/#/home/name=Alice&surname=Smith
I've added this route to my routes in the router.ts:
routes: [{
path:…

luthien
- 1,285
- 3
- 15
- 26
3
votes
2 answers
angularJS set route params in controller
I have an app which creates several surveys with random survey ids. As the ids are generated in the backend they are set in the controller. I read the documentation on that, however I do not really understand how to set the routeparams in order to…

threxx
- 1,213
- 1
- 31
- 59
2
votes
1 answer
NestJS how to pass @Param and @Query in same request
I have this route set up:
@Get('/name/like')
findByLikeName(@Query() query: { supplierID: string; name: string }) {
return this.supplierProductService.findByLikeName(query);
}
Which utilises the query params in the underlying service:
…

Bowis
- 541
- 8
- 31
2
votes
0 answers
Am I handling this route.params properly when using a nested navigator?
In my app, I have a modal that is supposed to pop up if the app detects the user came from the "FinishingScreen" other than that, the modal should not pop up.
I have a " Drawer Tab Navigator " nested inside of my " Main Tab Navigator "
When I…

shyguy189540
- 244
- 1
- 9
2
votes
1 answer
Passing data between screens, route.params, React Native navigation
I'm trying to pass some data between two screens in my app. I'm using for this route.params from react-navigation
(here is the docs https://reactnavigation.org/docs/params/).
In the first component - home.js - I have an array with some data and…

MartynBrzoz
- 101
- 4
- 11