Created
June 18, 2013 02:48
-
-
Save Chandler/5802321 to your computer and use it in GitHub Desktop.
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
when I visit /orgs/17 via a full refresh everything works as expected. | |
The page shows me some info about org 17 that is loaded from the server. | |
When I'm on the index page and I link to /org/17 using linkTo, the model isn't loaded..there's no org data on the page. | |
#index handlebars template | |
{{#linkTo organizations.show id class="org-name"}} {{name}} {{/linkTo}} | |
#router | |
Router.map -> | |
@resource 'organizations', path: "/orgs", -> | |
@route 'show', path: ":id", -> | |
@route 'new' | |
#org show route | |
OrganizationsShowRoute = Ember.Route.extend | |
model: (params) -> | |
OrganizationModel.find(params.id) | |
#show org handlebars template | |
<div id="org" class="simple-page"> | |
<h1 class="org-title"> The name of my org is {{name}} </h1> | |
</div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment