Questions tagged [named-routing]

50 questions
45
votes
3 answers

Named routes in mounted rails engine

I'm making a small rails engine which I mount like this: mount BasicApp::Engine => "/app" Using this answer I have verified that all the routes in the engine are as the should be: However - when I (inside the engine) link to a named route (defined…
Markus
  • 2,526
  • 4
  • 28
  • 35
6
votes
2 answers

Using named routes with parameters and form_tag

I'm trying to create a simple search form in Rails, but I think I'm missing something. I have a named route for search: map.search ":first_name/:last_name", :controller => "home", :action => "search" I'm trying to use that in my search form: <%…
Stewart Johnson
  • 14,281
  • 7
  • 61
  • 70
4
votes
2 answers

How to navigate to a route while a named outlet is child of an unnamed outlet

I am using Angular 5. I have one in app.component. I am dynamically routing to a particular component say 'dashboard'. this dashboard component have a named router-outlet and a set of child components. Now I have to change the content of the named…
Atanu Mallick
  • 266
  • 4
  • 7
4
votes
1 answer

How to generate the proper `url_for` a nested resource?

I am using Ruby on Rails 3.2.2 and I would like to generate a proper url_for URL for a nested resource. That is, I have: # config/routes.rb resources :articles do resources :user_associations end # app/models/article.rb class Article <…
Backo
  • 18,291
  • 27
  • 103
  • 170
3
votes
1 answer

How to correctly implements named router outlet in angular 7?

I am stuck with a problem on my code. I'm trying to make named route works but I cannot find out what I'm doing wrong. I tried the tutoriel on angular official site and others sites. I need to have a nav bar, (simulated by app-menu for the moment),…
xavatic
  • 185
  • 1
  • 2
  • 10
3
votes
3 answers

More-efficient way to pass the Rails params hash to named route

I need a more-efficient way to pass the params hash to a named route, including the ability to add/remove/modify a key/value pair. Adding a key (the :company symbol), while preserving the remainder of the params hash (manually specify each…
craig
  • 25,664
  • 27
  • 119
  • 205
2
votes
1 answer

Nested Routing for Single Table Inheritance model rails 3.1

I created a Single table inheritance model in my model file and am having difficulty with the routing. When I use :as in my resource, it renames my named path. Model file: class Account < ActiveRecord::Base belongs_to :user end class…
2
votes
0 answers

How to give transition for the named navigator in getx?

I am using named navigators for navigation. I set the default Transition to Transition.rightToLeft. Now the problem is when I navigate from /tasklist to /taskdetails page, The transition is good. But when I get back from /taskdetails to /tasklist,…
2
votes
1 answer

Flutter: How to combine PageRoute Animation with Navigator.of(context).pushNamed

I want to use animated page route on my flutter project. Now all of my routes are Named Route and I don't wanna change them. Is there any way I can use Page Route Animation with named route? Like: If I am going from PageOne() to PageTwo() using…
2
votes
0 answers

PageView vs Routing in Flutter

I am new to Flutter and cannot find many info about best practice about: when to use Raouting and when to use PageView. In my app i want to have shared ApBar and BottomNavigation also i want to have details page in some pages. Should i use PageView…
2
votes
2 answers

Extend Express JS router TypeScript definition for “named-routes”

We're using an extension called named-routes with Express which has served us quite well in the past. Now that we’re gradually TypeScript-ifying our codebase, we are facing following issue: The module extends Express’ router object, so that routes…
qqilihq
  • 10,794
  • 7
  • 48
  • 89
2
votes
3 answers

match method in routes.rb

I'm trying to follow this tutorial here but the tutorial seems to use this "match" function. match '/about', :to => 'pages#about' Whenever, I do the same, I get this error from the server: undefined method `match' for main:Object How can I edit…
Steve
  • 11,831
  • 14
  • 51
  • 63
2
votes
2 answers

rails named routes + controller as parameter

is it possible to have the controller value in a rails named route as a parameter, which I can pass at runtime to direct the call to the proper controller? e.g. map.ride 'ride' ,:controller => {some-way-of-specifying-a-parameter}, :action =>…
user350785
  • 73
  • 2
2
votes
1 answer

How to add :format options to a named route in Rails?

I've got a named route called profile and I would like to be able to access it as json. But when I look at my rake routes output I see that the (.:format) is missing. How do I add it to a named route? user GET /users/:id(.:format) …
Alfred
  • 7,071
  • 4
  • 27
  • 35
1
vote
0 answers

How to have the ability to use both Navigator.push and Navigator.pushNamed flutter

I have added some routes to my flutter app so that when a specific link is pressed a specific page will be opened This is the source code of the main page import 'dart:convert'; import 'package:admob_flutter/admob_flutter.dart'; import…
Ahmed Rajab
  • 603
  • 3
  • 10
  • 28
1
2 3 4