Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8624563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:33:36+00:00 2026-06-12T07:33:36+00:00

I have a simple template that loops over a ember-data model. Inside the loop

  • 0

I have a simple template that loops over a ember-data model. Inside the loop I want to provide a simple anchor tag that passes the id of the element along to the router so I can transition to another ember view. What I have below shows “undefined” in the href when I hover over the link, but when I log the content in the route it’s the ember-data model (not just the id as I’d like it to be).

<script type="text/x-handlebars" data-template-name="session">
    {{#each session in controller}}
      {{session.id}}<br />
      {{session.name}}<br />
      {{session.room}}<br />
      {{session.desc}}<br />

      {{#each speaker in session.speakers}}
      Speaker: {{speaker.name}}<br />
      {{/each}}

      <a {{action showSessionDetails session href=true}}>View Session Details</a>

      <br /><br />

    {{/each}}                                                                                                
  </script>

Here is the router

CodeCamp.Router = Ember.Router.extend({
  root: Ember.Route.extend({
    index: Ember.Route.extend({
      route: '/',
      showSessionDetails: Ember.Route.transitionTo('sessionDetails'),
      connectOutlets: function(router, context) {
        router.get('applicationController').connectOutlet('session', router.get('store').findAll(CodeCamp.Session)>
      },
      index: Ember.Route.extend({
        route: '/'
      }),
      sessionDetails: Ember.Route.extend({
        route: '/session/:id',
        connectOutlets: function(router, context) {                                                                
          console.log("here " + context);
        }
      })
    })
  })
});

Thank you in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:33:37+00:00Added an answer on June 12, 2026 at 7:33 am

    Turns out I just needed to implement my own serialize and deserialize methods

        sessionDetails: Ember.Route.extend({
            route: '/session/:session_id',
            connectOutlets: function(router, session) {
              router.get('applicationController').connectOutlet('session', session);
            },                                                                                                         
            serialize: function(manager, session) {
              return { "session_id": session.get('id') }
            },
            deserialize: function(manager, params) {
              return CodeCamp.Session.find(params["session_id"]);
            }
          })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a simple template that i populate with some data then im trying
I have a simple webpage that uses the jquery template plugin to dynamically load
I have a simple erb template that pulls information from a (Grit) git repository.
In /app/design/frontend/default/[theme]/template/catalog/product/list.phtml you have the following snippet that loops through and displays the $_productCollection
I have store a sample document inside my local server named template.doc. Then I
I have simple php validation form that is halfway working. If you leave the
I have simple win service, that executes few tasks periodically. How should I pass
I have a simple Book Author relationship class Author(models.Model): first_name = models.CharField(max_length=125) last_name =
I have written a WCF service with the REST template that has the defaultOutgoingResponseFormat
I have a simple view function that's designed to allow the user to choose

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.