469 questions
3
votes
1
answer
96
views
React Router Nested Routes
I'm having issues configuring react-router-dom with nested routes loaded by sub-modules.
In my application I need to dynamically load modules that have their own nested routes. One of the requirement ...
1
vote
0
answers
114
views
Angular Route Reuse Strategy Parent Route and Child Route
I want to create a custom RouteReuseStrategy. The purpose of this RouteReuseStrategy is to store the parent route when navigating from a parent to a child route.
Routes:
export const routes: Routes = [...
1
vote
1
answer
105
views
React router 6 pass properties from parent to children
I am not a frontend expert, so excuse any stupidity in my question. So, the question is, how to organise router config so that props from parent component FieldFormats, which is just a list of ...
0
votes
2
answers
76
views
I have problem using createBrowserRouter . the MainLayout can't read props and I don't know why
all exports/imports work fine.
MainLayout.js file the only file in layout :
the sidebar is fixed in all pages except Login, Register and Not Found.
in folder layout there is just MainLayout.js
const ...
1
vote
1
answer
1k
views
Error with getStaticPaths() and getStaticProps() with nested routes in NextJS 14
I am making a blog with two level nested routes: example.com/blogs/[chapterID]/[postID] The static posts saved in local folder (outside the app folder) as markdown files.
The urls are stored in the ...
0
votes
1
answer
893
views
Express App - Creating a Nested Route with ES Modules
I've followed a tutorial to create an Express app with an API. With the tutorial completed, I am now trying to convert it from CommonJS to ES Modules. I tried looking through resources like the ...
0
votes
1
answer
58
views
Laravel Package - Experiencing different data of model between in the test file and in the controller
I'm currently working on a laravel package that has route configuration below
Route::apiResource('companies', Controllers\CompanyController::class);
Route::apiResource('companies.addresses', ...
2
votes
1
answer
914
views
React Router v6 Protected Routes Dynamic Index Page
I'm trying to create a dynamic "index" page whereby if the user is authenticated, the "/" route shows a dashboard component and if they are not authenticated, the "/" ...
0
votes
1
answer
867
views
Laravel 10 - UnexpectedValueException - Invalid route action, how to setup route namespace in route namespace
I have upgraded my Laravel application to version 10 and encountered an issue with setting up a route with a namespace. In previous versions of Laravel, I used the following code in my routes/web.php ...
1
vote
1
answer
200
views
Nested Routing is not displaying the component
I'm trying to display CollectionPage Component from ShopPage component as a nested route that receives match as a param but I get an empty page with an error.it is not rendering the collection page ...
0
votes
1
answer
486
views
Nested Route Implicit Binding Laravel Return 404
So, this is my code.
web.php
Route::get(
"/research/{research}/sub-research/{sub-research}",
function (Research $research, SubResearch $subResearch) {
dd($research , $...
-2
votes
1
answer
164
views
Laravel can't find the second passed parameter
I'm passing two parameters to my ShopController. one is a lang parameter that is in a route group as a prefix for all routes and the second one is a slug passed through a link.
Here's my controller:
...
0
votes
1
answer
124
views
What is the right way to add path for <img> element in React JS?
I'm using React Router for my React Project and I've been displaying my svg icons in the following way:
<img src="./icons/dashboard-sidebar-toggler.svg" className="mr-12"><...
2
votes
0
answers
115
views
how to create nested router using useNavigate
Hello to all dear friends
I have a program that, as soon as the system is loaded, the user logs in, and if the login conditions are correct, it enters the next step, which has several menus.
It means ...
0
votes
1
answer
966
views
How can i nest child components in next js like react outlet?
I'm a react JS developer and trying to create nested childrens in nextjs. In react i used the outlet to nest the child components but how can i nest child in next js.
Folder Structure:
https://i....
1
vote
0
answers
1k
views
How to implement separate routing for sidebar in react router v6.4
I would like to use new React router loader features, but I cannot figure out how to convert it in my application.
I used Route in multiple components but since new ReactProvider needs whole tree of ...
2
votes
1
answer
6k
views
How do I use the loader feature from react-router v6.4 on the route's element?
I upgraded to [email protected] and I want to use the loader prop.
My router looks like this:
const router = createBrowserRouter(
createRoutesFromElements(
<Route>
<Route path=&...
0
votes
1
answer
106
views
Couldn't find Category with 'id'=id
When i click my link_to, it takes to http://localhost:3000/categories/id rather than http://localhost:3000/categories/1. When I put the 1 into the URL it then takes me to the correct page, but I want ...
-2
votes
1
answer
84
views
laravel nested controller with 3 model
is possible to use 3 model in laravel nested controller?
this my route now:
...
'supplier' => SupplierController::class,
'supplier.item' => SupplierItemController::class,
...
i want to use 3 ...
0
votes
0
answers
96
views
Rails create custom view and route similar to new.html.erb
I'm looking to create a custom nested view that behaves similar to new.html.erb but not exactly sure how to do so with Rails 6.
In my routes I've defined the following -
resources :courses do
...
0
votes
1
answer
608
views
Angular nested routes showing blank page
I want to make the nested routes in angular. I want the customer to navigate into the shop and add products to the cart, when done adding products to the cart, proceed to checkout.
Below is my app-...
3
votes
2
answers
8k
views
React router v6 - Navigating from parent route to nested route without showing the parent route
I'm trying to use nested routes for this code here in my Router.js:
return (
<Routes>
<Route path="" element={<Home />} />
<Route path="/DriverPage/*" ...
1
vote
1
answer
402
views
Nesting React routes to login-protected pages [duplicate]
I am using [email protected]
I have created a React app where certain Private pages are accessible only users who have logged in.
You can find a demo here, and a GitHub repo here.
A simplified ...
3
votes
1
answer
1k
views
How to hide parent component when routing to nested path v6 reactjs?
The Exhibitions element holds a table of 9 exhibitions. On click on an exhibition from the table I want to route to the page of the exhibition (Exhibit1), currently attempting to do so via nested ...
1
vote
1
answer
144
views
comment.user.username not working on show.html.erb
i'mtrying a simple feature where a user can comment on inquest post , but comment .user.username is not working ,it's rendering comment.user but does not support user attributes
create_table "...