-
Notifications
You must be signed in to change notification settings - Fork 135
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
Cannot GET /pages #156
Comments
My experience with Locomotive has always been that writing routes is a best practice. I am not aware of any automatic interpretation of routes from controllers/actions. I'm actually not aware of any server side MVC pattern that supports automatic route matching, and it's a role that really should belong to the developer. |
I don't know, I've used other frameworks (not Node.js related) that have an approach that seems to help with the mainstream routing. Let me see what you think, here is a example: //...
exampleController.indexAction = function()
{
// the "Action" append in the object name automatically
// triggers a view implicity, so the framework links the view
// "views/example/index.html.ejs" with this action
}
exampleController.someFunc = function()
{
// no "Action", no implicit search for a related view
}
This way you could easily create new Controllers / Views without the need to manually define a route every time you want a new page. |
But what about variable instantiation and naming? For index actions this is probably fine, but as you get into item/foo type In either case, I'm fairly sure in it's current form locomotive doesn't On Sat, Jul 19, 2014 at 6:38 PM, Claudio Holanda Jr. <
|
As playing for the first time with Locomotive.js I've found myself not managing to access other views/controllers via browser.
Basically What I do is create a new controller, a new view directory / view file, and when I try to access it via url it throws the title message.
Do I have to explicitly set each controller/view on routes so them can be accessed? Or this should work automatically?
The text was updated successfully, but these errors were encountered: