Nested routes allow to capture relationship in your routing.
Questions tagged [nested-routes]
462 questions
3
votes
1 answer
Replace parent component entirely in child route
I'm trying to nest routes with the VueJS router (next/4.x) so that the child route completely replaces the parent component.
The example given here assumes that for each sub route, there's a sub component being rendered, but I'd like to replace the…

orange
- 7,755
- 14
- 75
- 139
3
votes
1 answer
How to nest routing in Vue with many children?
I have three main views that each holds its own mark-up and unique content. The plan was to handle it like this:
View 1: Users
List all users, links to each user, which is view 2. With a routerlink you go to view2.

bjorn
- 129
- 1
- 11
3
votes
2 answers
Nested routes not rendering in router-view
I'm setting up what is going to be a large system, so I want to have decentralised router.js files for every module. Each of them would have routes arrays declarations that would be pushed to the main routes array.
So for now I have a kind of root…

Arnaldo Perez
- 581
- 1
- 4
- 10
3
votes
1 answer
Children routing not working and application redirects to the 404 page
I have created an angular application version 7 and project structure is like this.
app module have app-routing.module.ts and dashboard module have dashboard-routing module.ts. In dashboard module, the layout component route has child components…

Muhammad Ahsan
- 608
- 15
- 28
3
votes
1 answer
Help with .net mvc routing
I haven't been able to find something somewhat similar to rails nested resources. I want to be able to define routes like
Contributors/3/Activities
which is just simply ActivitiesController, Index, with Contributor_Id = 3
I know I could manually…

nacho10f
- 5,816
- 6
- 42
- 73
3
votes
1 answer
angular 5 multiple router-outlets on a nested page
The problem is a combination of nested router-outlets, which I have working, with having multiple router-outlets on the child page. For simplicity, I have one Home page with a "Login" link
HOME COMPONENT (Splash Page)

Yogi Bear
- 943
- 2
- 16
- 32
3
votes
1 answer
Nested Routes with Root Router Outlet in Angular 4
I'm using nested routes in my Angular 4 application. They are structured as follows:
routes = [
{
path: 'parent',
component: ParentComponent,
children: [
{
path: 'child',
component: ChildComponent,
…

Krishna Chaitanya
- 397
- 4
- 14
3
votes
2 answers
How do you render a rails partial that is outside of a namespace in a view that is inside of a namespace?
I've got a 'static' controller and static views that are pages that don't utilize ruby in their views. For these pages, I have a sitemap partial that is generated programatically and used in the application layout file. Namespaced routes still use…

iand675
- 1,118
- 1
- 11
- 23
3
votes
2 answers
React Router v4 global no match to nested route childs
How can I redirect the user to a NoMatch component when I have nested routes in React Router V4?
Here is my code:
import React from 'react';
import ReactDOM from 'react-dom';
import injectTapEventPlugin from…

yurikilian
- 33
- 6
3
votes
4 answers
Angular ui-router ng-if current exact state
Having trouble managing my parent-child state mostly as I am new to ui-router. However, I've done research and came across solutions that require hard-coding of routes but are not dynamic.
What I currently have:

DraganTL
- 73
- 1
- 7
3
votes
2 answers
react-router: Nested route component mounts before parent route component?
I have a nested route like this:
I noticed that Module is mounting before Modules mounts. Is this the intended functionality of nested routes? I ask…

connected_user
- 814
- 1
- 9
- 25
3
votes
0 answers
Rails 5 - paths for nested routes - service classes
I am trying to learn how to think the way rails expects. It has been a 4+ year struggle and I'm still not there.
I've asked variations on this question so many times now and I still can't decipher a principle I can use to think for myself when it…

Mel
- 2,481
- 26
- 113
- 273
3
votes
4 answers
React Router master-detail: children component don't render new view until page refresh
I am creating a master-detail navigation just like the example here the react router example;
I have a container component OneCheckpointContainer, which renders a navigation panel CheckpointNav (the links), and a data component OneCheckpointData…

fresh5447
- 1,242
- 3
- 14
- 27
3
votes
1 answer
Rails 4 nested routes
routes.rb
Rails.application.routes.draw do
root to: 'visitors#index'
resources :states do
resources :cities do
get 'listings'
end
end
end
I am looking to have my GET URL set up like:
../state.id/city.id/listings.id
I am…

baconck
- 386
- 2
- 5
- 19
3
votes
2 answers
Implicit routing for nested controllers with same namespace
Given Rails 4.1, two controllers CRM::CompaniesController and CRM::ContactPeople, two models CRM::Company and CRM::ContactPerson and the following routes:
namespace :crm do
resources :companies do
resources :contact_people
end
end
The…

Sebastian vom Meer
- 5,005
- 2
- 28
- 36