Questions tagged [nested-routes]

Nested routes allow to capture relationship in your routing.

http://guides.rubyonrails.org/routing.html#nested-resources

462 questions
0
votes
2 answers

Angular 8 Route Child is displayed wrong

I have a app.routing module, where I load different modules. This modules have their own child routes and so on. For example I created this rout with child routes: localhost:4200/usermgmt/create My problem is now, when I just…
Oiletz Matze
  • 125
  • 1
  • 3
  • 11
0
votes
2 answers

How to define a controller function that works for instances of any model

Implementing versioning for a Rails app I'd like to have a view that displays all versions of a model with some extra functionality like reverting etc. I use the paper_trail gem for the versioning. I know that I could do that by writing a controller…
Martin Klepsch
  • 1,875
  • 3
  • 18
  • 24
0
votes
0 answers

React nested route with params in the middle

I have a module in react project and want to use nested routes with params in the middle of url, but after clicking the link it redirects to not found page. The current page url like this: "/AssetContext/Transfers/123" And the nested route on the…
0
votes
2 answers

How to use nested-subfloders routing in nodejs express application?

I am working on a node project using express. I have some folders in the routes folder which include several .js files having routes. I want to keep the structure this way to keep my code neat & clear. How to require the routes in app.js file…
fight_club
  • 327
  • 4
  • 13
0
votes
0 answers

Angular 6 named outlet in component and nested routes

I haven't been a bit away from Angular for a while and I am getting back to it. I am encountering issues with nested routes and named router outlets. I have a main component that holds the primary outlet: app.component.ts
aur8l
  • 125
  • 13
0
votes
3 answers

How to fix 'updating a comment sent me to the wrong route'

I am building an app and I have a device user controller, for login with scaffold of Comment and Post. My problem is that when I update a comment and hit the button update it send me to the route http://localhost:3000/publicaciones/1/comentarios…
0
votes
1 answer

Which way to declare nested routes in React-Router-Dom

I'm working with reactJs and trying to create some nested routes. Below you can see the routing parts of my files : main.js : ReactDOM.render( , document.getElementById('page') ); App.js : class App…
Cracs
  • 425
  • 1
  • 8
  • 29
0
votes
1 answer

React Router 4 -- handling 404 for nested routes

I have the following code and I am going to handle nested route while wrong one is entered:
2019
  • 81
  • 1
  • 1
  • 9
0
votes
2 answers

Stacknavigator containing tabbed navigator ignores one of the routes

I have a StackNavigator that contains a Tabbed Navigator(with two tabs) and a single route CreateReviewsScreen, that is not within the Tabbed Navigator. When I try to navigate back from CreateReviewsScreen to the tabbed navigator I'm unable to do…
0
votes
2 answers

Angular 7 Navigate to parent/:idChildroute/childroute, invoke data according to the route from a service

I have a component which has a scroll-able list for navigation, within that are 5 more components which show different information for the list item clicked, eg: When I click on a list item it opens a component with angular material mat-tab-group,…
0
votes
1 answer

Rails 3 / nested routes: Problem to redirect to the correct url for a collection of microposts in a user show page

I have a problem with nested routes which don't display correct url. I use the below code, but it renders something like: .../users/[:user_id]/microposts/[:user_id] instead of: .../users/[:user_id]/microposts/[:micropost_id] for every…
benoitr
  • 6,025
  • 7
  • 42
  • 67
0
votes
0 answers

shallow nesting on update doesn't know about parent when using has_and_belongs_to_many

From the documentation the below route for edit and update will be like /comments/:id resources :articles do resources :comments, shallow: true end When I am updating comments and it doesn't know about articles how do you get back to the comments…
iJK
  • 4,655
  • 12
  • 63
  • 95
0
votes
2 answers

Angular 6: cannot macht routes (nested)

I have this very simple project to test nested routing. The app-routes work, but not the children "cannot match any routes", says the error. Checked other answers but the versions made me confused. Here's what I have: APP.MODULE.TS import {…
Mellville
  • 1,027
  • 2
  • 18
  • 39
0
votes
1 answer

How to handle a in the views a model that belongs to another and given its ID the view should display different info?

Right now I'm making a website and I need to implement this functionality a user type Client belongs to a Company, so when it logs in, the Client should see a view regarding that company, I'm not sure how to handle this because he should see the…
jean182
  • 3,213
  • 2
  • 16
  • 27
0
votes
1 answer

Nested routes in express project

I am new to nodejs/express. I have one requirement to host some nested pages. For example, I have to host some pages like: http://IP:port/cartoons, http://IP:port/cartoons/micky, http://IP:port/cartoons/minnie I am able to host cartoons page,…
love
  • 1,000
  • 2
  • 16
  • 35