Skip to content

Instantly share code, notes, and snippets.

@Chandler
Created June 18, 2013 02:48
Show Gist options
  • Save Chandler/5802321 to your computer and use it in GitHub Desktop.
Save Chandler/5802321 to your computer and use it in GitHub Desktop.
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