Created
June 30, 2012 02:55
-
-
Save juliocesar/3021963 to your computer and use it in GitHub Desktop.
Sample Tres app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> | |
HomeScreen = Tres.Screen.extend() | |
App = new Tres.App | |
App.on | |
'' : new HomeScreen | |
App.boot() |
The empty string for the first key in App.on seems odd. Would you normally have something more descriptive there?
That's the root URL, as you probably figured. Backbone will let you get away with using "/", which is more obvious, I think.
Yah. Even if '' "works", I'd say '/' is a better minimal example, for
clarity.
…On Wed, Jul 4, 2012 at 9:20 PM, Julio Cesar Ody < ***@***.*** > wrote:
That's the root URL, as you probably figured. Backbone will let you get
away with using "/", which is more obvious, I think.
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/3021963
Except it doesn't. And yes, it's sad.
When I saw your comment yesterday I wasn't in front of my computer, so I couldn't test it, but I vaguely recalled something along the lines of routes not matching when you add a "/" in front of them. That's what actually happens if you do.
Ahh, riiiight. With non-root cases, that doesn't look so bad. But yeah,
empty string for root path is meh. Not your fault.
…On Thu, Jul 5, 2012 at 6:24 AM, Julio Cesar Ody < ***@***.*** > wrote:
Except it doesn't. And yes, it's sad.
When I saw your comment yesterday I wasn't in front of my computer, so I
couldn't test it, but I vaguely recalled something along the lines of
routes not matching when you add a "/" in front of them. That's what
actually happens if you do.
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/3021963
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Trying to keep the "code required for basic apps" at a minimum. This is currently the bare minimum necessary for creating a Tres app.