Created
June 9, 2013 15:31
-
-
Save alexspeller/5743945 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // Messages and detail routes are rendered inside the thing template. | |
| // The thing template should have an {{outlet}} where the sub-routes should be rendered | |
| App.Router.map(function(){ | |
| this.resource('thing', {path: 'things/:thing_id'}, function() { | |
| this.resource('messages'); | |
| this.resource('detail'); | |
| }); | |
| }); | |
| // Only one of these routes will show at a time | |
| App.Router.map(function(){ | |
| this.resource('thing', {path: 'things/:thing_id'}); | |
| this.resource('thingMessages', {path: 'things/:thing_id/messages'}); | |
| this.resource('thingDetail', {path: 'things/:thing_id/detail'}); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment