Questions tagged [routeparams]
126 questions
2
votes
1 answer
Default parameter for methods in routing type resource Laravel 8
I'm trying to add default parameter to resource routing as per documentation:
My code looks like:
Route::resource('flats', FlatsController::class)->parameters([
'index' => 'test_parameter',
'create' => 'test_parameter1',
'update' =>…

natsukiss
- 31
- 5
2
votes
2 answers
How to access stylesheet when I render as EJS in a dynamic route based on URL parameters
I recently started learning Express.js and mongoose by creating a simple To-Do List, and now I'm stuck with a basic thing.
When I tried to render a EJS file in a dynamic route based on URL parameters, I was unable to apply the stylesheet.css which…

sekai_no_suda
- 413
- 4
- 11
2
votes
0 answers
React Router params not working correctly with tomcat
I am creating web app with ReactJS frontend and Java EE + tomcat backend. I'm using React Router for routing. On localhost everything works fine, but on a deployed version I am getting errors.
…

dm98
- 53
- 4
2
votes
1 answer
How to create an api in express with route param and query param
My application is in nodejs with express.
Im trying to construct an API which has route param and query param both
below are the things what i have tried
using **=**
app.get('/:accountId/accounts/password/update?uniqueCode={uniqueCode}', async…

The JOKER
- 453
- 8
- 21
2
votes
1 answer
Angular Routing Route Params is empty object in Child Component's Resolver
This is my route setup.
const appRoutes: Routes = [
{
path: '',
component: HomeComponent
},
{
path: 'get',
canActivateChild: [CanActivateOrder],
children: [
{
path: '',
redirectTo: 'confirm',
…

Anjil Dhamala
- 1,544
- 3
- 18
- 37
2
votes
4 answers
Unable to access a route parameter through route.snapshot in root component
I want to get token from url but it return null as value.
app.component.ts:
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-root',
templateUrl:…

Vishak P
- 23
- 2
- 4
2
votes
2 answers
Subscription to route params not triggering
I am using ActivatedRoute and subscribing to its params to get triggered. But, the subscription is not triggering.
Code:
constructor(public activatedRoute: ActivatedRoute) {
this.activatedRoute.params.subscribe((params : any) => {
…

Sai M.
- 2,548
- 4
- 29
- 46
2
votes
2 answers
JavaScript | Angular: UI Router $stateParams With Octothorpe Is Falsey
Issue
I have an abstract route that looks like this: #/app/lists/:label.
Which is great when User creates a "label" of 'Breakfasts'.
However, when the label value is '#All', then $stateParams.label === "".
Question
How can I get Angular/-ui-router…

Cody
- 9,785
- 4
- 61
- 46
2
votes
1 answer
How to send empty string in routeparams in angular Js?
Hi I have a form in which I am sending a searched term and category id . It works fine as I am sending both things but if a user does not enter any thing only 'category id' goes, and in back end if searched term is empty all results are display to…

Usman Iqbal
- 2,379
- 5
- 26
- 50
2
votes
1 answer
AngularJS infinite loop when routeParams not null
I'm trying to use the routeParams so I can get part of a URL, but it gets me into an infinite loop when I try to access to the URL with a GET parameter. Currently, I have the following defined:
var nappet = angular.module('nappet', ['ngRoute',…

Xabi
- 159
- 1
- 3
- 13
2
votes
2 answers
RouteParams in AppComponent
I'm trying to make a simple one component app for testing out Angular2, but I am very stuck on accessing the RouteParams in my app component.
This is what I have so far:
@Component({
selector: 'app',
template: '
ID: {{id}}
', …
Simon Brix
- 102
- 1
- 10
2
votes
2 answers
Angular2 Query Parameter from index URL
I am trying to get the query params from a url in a component in Angular2
Version: "angular2": "npm:angular2@2.0.0-beta.12",
I am trying to extract id query param in the component and display it
Here is the request.…

user1315955
- 131
- 1
- 1
- 7
1
vote
1 answer
How to filter in React Router using searchParams
I am currently making a product filter website with react-router. I am able to get the searchParams, for example "color: black" but as soon as I select a different color it replaces the current selected value, but I would like to set multiple values…

bukke
- 13
- 4
1
vote
0 answers
params.get("") is not working when i try to render a page with an id from a local dataset
I'm trying to create a page that renders information dynamically by drawing from a local dataset using params.get(""). While the URL is set, whatever parameter I put in params.get("") does not render on the page.
Here is the code for directing the…

Malik Awesu
- 11
- 1
1
vote
0 answers
Render Error Keeps haunting me - React Native
So I have been using
import { useRoute } from '@react-navigation/native'
const ProductInfo = () => {
const {
params: {
category,
coreProduct,
subProduct
},
} = useRoute()
return (
{category}
…

Justin Eastin
- 21
- 4