question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Group Routes error

See original GitHub issue

I want to group all my public routes. I have defined my routes as under

var publicRoutes = FlowRouter.group({
     prefix: '/'
 });

publicRoutes.route('/', {
 name: 'home',
 action: function() {
     BlazeLayout.render('mainLayout', {contents: 'HomePage'});
 }
 });
 publicRoutes.route('/signup', {
     name: 'signup',
     action: function() {
         BlazeLayout.render('mainLayout', {contents: 'SignUpPage'});
     }
 });

The home route is working fine where as I am getting “There is no route for the path: /signup” for the second route.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
churchocommented, Aug 18, 2015

The issue could be the prefix on the route definition. If you leave it blank it should be able to work.

var publicRoutes = FlowRouter.group({
    prefix: ''
});

I think the best use case scenario for groups would be /admin, /public, /membersarea basically named url prefixes. In this case having prefix '/' doesn’t really make much sense since that would be the root and probably all routes inherit from this.

0reactions
arunodacommented, Sep 28, 2015

I think we can close this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Route group error - Laracasts
Hi I'm creating some routes for my API and I'm getting this error, and I don't know how to fix it. you passed...
Read more >
Routing Error Due to a group prefix in my route - Stack Overflow
In your CostIncludeController@index, add the new variable. The router is expecting you to handle two variables. public function index($page, ...
Read more >
HTTP Routing - Laravel - The PHP Framework For Web Artisans
Route groups allow you to share route attributes, such as middleware or namespaces, across a large number of routes without needing to define...
Read more >
error in adding routename to the group route #23494 - GitHub
if i add route name for group route i have got this error. Illuminate\Routing\Router::loadRoutes(): Failed opening required 'Array' ...
Read more >
State handlers | Dialogflow CX - Google Cloud
To make routes reusable, you can define route groups. These groups are a resource for the entire flow. For example, you may want...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found