Questions tagged [route-parameters]

Frameworks that provide routers like offer logic to define routes in a parametrized way

28 questions
0
votes
1 answer

Validating route parameters to be greater than zero in Laravel

How can I validate {id} to be greater than zero in the following route? Route::get('/posts/{id}/show', [PostController::class, 'show'])->whereNumber('id');
max256
  • 35
  • 3
  • 8
0
votes
1 answer

Property 'category' does not exist on type 'Readonly' and Property 'data' does not exist on type 'Readonly'

I am trying to access the data from route.params sent from navigation screen, App is running fine but typescript conplain about my code "Property 'data' does not exist on type 'Readonly', Property 'category' does not exist on type 'Readonly'. if I…
0
votes
1 answer

How to prevent Apache Camel delegating route parameters to called route url

I'm trying to get in touch with Apache Camel, but it's behaviour is so far confusing. For example, I'm using platformHttp and declare a route under which my endpoint should be available. from(platformHttp("/api/test")) …
Marian Klühspies
  • 15,824
  • 16
  • 93
  • 136
0
votes
1 answer

How do I display a route parameter (Vue / Firebase)

I'm creating a blog with free sewing patterns as content. I'm using route parameters to receive each blog individually. However, I'm getting a blank page when trying to retrieve its data from firebase firestore. Please help. The blog's id appears…
0
votes
3 answers

Blazor: Forcing Component/Page Life-cycle

I'm building an application using Blazor Web-assembly and I want the user to be able to load the application via a route, e.g. http://www.someapp.com/{Page}/{Item} If the user selects the above route it should go to {Page} and display {item}. This…
0
votes
1 answer

How to ignore specific files to be loaded when I use route parameters in Express

When I make a GET request with route parameters in express with mongoose like the following code, I sometimes see that the browser tries to load some unexpected files such as favicon.ico, robots.txt, humans.txt, sitemap.xml, ads.txt, etc., and 404…
sekai_no_suda
  • 413
  • 4
  • 11
0
votes
1 answer

Difference between app.use(express.static(__dirname + '/public')) and app.use(express.static('public'));

I wonder if the following two are the same. (1) app.use(express.static(__dirname + "/public")); (2) app.use(express.static("public")); Because I think as long as (2) exists in the express server, the browser can serve up the public folder which is…
sekai_no_suda
  • 413
  • 4
  • 11
0
votes
2 answers

CSS and JavaScript libraries are not working with Required Parameters in Laravel

In my Laravel application, all the CSS and JQ libraries are working fine. But as soon as I use routes with parameters it breaks CSS, JQ, and fontawesome. Then I managed to fix the CSS issue by using Assets URLs as below. {{…
Kavinda Prabhath
  • 323
  • 3
  • 12
0
votes
2 answers

Angular routing with pages following parameters

I have an Angular 5 app in which I need a URL to use the following form: www.example.com/#/company//transactions I am using a non-named router outlet The companyId is a parameter. Initially I left off the…
-1
votes
3 answers

error when try to open route without parameter in Laravel 9

I have a problem when trying to access any route without parameter: When I wrte any route without {uname} parameter like this or any other one: http://127.0.0.1:8000/login/ show me this error : and it is in the home in another controller? These is…
Osama Mohammed
  • 2,433
  • 13
  • 29
  • 61
-1
votes
1 answer

Route parameters - subscribe method

"Angular does not create the component if it is already present in the DOM. It reuses the component instance. This implies that the ngOnInit life cycle hook is not invoked when the user navigates to the component again." Based on this, I cannot…
-1
votes
3 answers

How to access route parameters in node.JS?

I want to access the route parameters in Node.JS and I am using the following syntax: app.get("posts/:postName", function(req,res){ console.log(req.params.postName) }); Is something wrong in the syntax? The error I get in the browser is, "Cannot…
Piyush
  • 9
  • 3
-2
votes
1 answer

How to pass encrypted ID as route parameter in Laravel Route Model Binding

I want to pass encrypted ID as route parameter. Currently, I'm using Route model binding and it returns a 404
1
2