Questions tagged [nested-routes]

Nested routes allow to capture relationship in your routing.

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

462 questions
1
vote
1 answer

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 "/" route shows a landing page; effectively having the same path for two different…
Sags
  • 37
  • 1
  • 6
1
vote
1 answer

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 from inside the shop page. These are my…
1
vote
1 answer

Angular 2 - Audio player component gets destroyed when navigating between routes

I am developing a website for music groups. One of its components is an audio player. In case the user activates the audio player, I need it active regardless if the user changes path. The player is located in the parent component (pages.component)…
1
vote
0 answers

Yet another routing error in Rails3.1 when I tried to nest the resource

This is my error: No route matches {:controller=>"accounts", :format=>nil} and this is the url: users/1/accounts/new this is code in the routes.rb file: resources :users do resources :accounts end OK, now I'm still confused about associations…
castiel
  • 2,675
  • 5
  • 29
  • 38
1
vote
1 answer

Activate Angular guard for both parent and child nested module routes

I'm working with Nested Module Structure and having some difficulty to implement guard. Right Now I have to use canActivate on parent module route and canActivateChild on every child module route. I want a solution where I will just put guard on…
1
vote
0 answers

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 routes in prop I don't know how to solve it. So…
1
vote
1 answer

Rails redirect issues

I have setup some simple associations in my rails app: resources :properties do resources :units end After updating a unit: 'localhost:3000/properties/2/units/3/edit' I want to be redirected back to the appropriate location. after I click…
Paul
  • 401
  • 5
  • 16
1
vote
1 answer

React routing based on id

I work with react-router v6. I want to create a new route based on an id. On my homepage "example.com" I have a selection of articles. I want to create a detail view for each article "example.com/{id}". My approach looks like this: App.tsx import…
user16540880
1
vote
0 answers

Nested Routes error can not navigate to MainPage

I'm using a custom bottom navigation bar and I want to navigate between my pages, so I used the auto_route package. After the splash screen launches, my app screen turns white and I get this error ** Launching lib/main.dart on iPhone 13 Pro Max in…
1
vote
1 answer

Nested Child route in Angular 13

I want to navigate nested child routes using children inside app-routing.ts file. But my components not get called. code is as follows: app-routing.ts file import { NgModule } from '@angular/core'; import { RouterModule, Routes } from…
Swapnali Botre
  • 101
  • 1
  • 13
1
vote
1 answer

Nesting React routes to login-protected pages

I am using react-router-dom@6.3.0 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 version of this is shown below. I have wrapped…
James Newton
  • 6,623
  • 8
  • 49
  • 113
1
vote
0 answers

Nested Routes in Flutter

I am trying to create nested routing in Flutter v3. I have implemented the idea in here: https://docs.flutter.dev/cookbook/effects/nested-nav My design goes like this: I have three different layouts. AuthLayout SystemLayout AfterAuthLayout In…
1
vote
1 answer

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 "comments", force: :cascade do |t| t.string…
1
vote
3 answers

React Router V6 nested Routes with i18n

I have a question about React Router V6 nested with i18n. This is my first multi-language service. const MainPage:React.FC = () => { const lang = i18n.language; return ( <> {/* Main */} …
1
vote
0 answers

Is the a way to nest routes when the routes are not defined properly ruby

I want to go down a deep repository where the routes are not defined properly. with the brute fix, I can go down 2 levels. is there a way to get access to multiple parameters and go down n levels deep. get '/' do @command = Command.new …