Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate URLs for routes #3151

Closed
slavafomin opened this issue Aug 14, 2015 · 2 comments
Closed

Generate URLs for routes #3151

slavafomin opened this issue Aug 14, 2015 · 2 comments
Labels

Comments

@slavafomin
Copy link

Hello!

It looks like Sails doesn't provide a way to generate URLs for routes. It means, that developer needs to provide URLs in several places of the application (in route configuration, in links, in scripts, etc). This dramatically breaks the DRY principle. I do believe that URL generation is a very important aspect of a router component for any solid web framework. For example Symfony 2 and Angular.js knows how to do this.

In order to implement this we will need a way to specify unique names for routes and URL generator should be both available as a service and as a view helper.

What do you think?

@slavafomin
Copy link
Author

Hello @tjwebb, I think you misunderstood my issue. I were taking about a way to generate URLs to the specified routes dynamically to use them in the views (or controllers). Please see this chapter for example: http://symfony.com/doc/current/book/routing.html#generating-urls-from-a-template.

@sailsbot
Copy link

Thanks for posting, @slavafomin. I'm a repo bot-- nice to meet you!

It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message. On the other hand, if you are still waiting on a patch, please:

  • review our contribution guide to make sure this submission meets our criteria (only verified bugs with documented features, please; no questions, commentary, or bug reports about undocumented features or unofficial plugins)
  • create a new issue with the latest information, including updated version details with error messages, failing tests, and a link back to the original issue. This allows GitHub to automatically create a back-reference for future visitors arriving from search engines.

Thanks so much for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants