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

  • SEARCH
  • Home
  • 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 9160969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:51:44+00:00 2026-06-17T13:51:44+00:00

I have a jsfiddle with a route as shown below, which is exactly thesame

  • 0

I have a jsfiddle with a route as shown below, which is exactly thesame as the one in emberjs guides and when I click on the #linkTo helper attached to {{post.title}}, it ought to show me the individual post but it does not and instead the console shows this errors:

Uncaught Error: assertion failed: Cannot call get with ‘id’ on an undefined object.

Also when I click the posts link on the home page, it displays all the titles but in the console, it also shows this error:

Uncaught Error: Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.

EmBlog.Router.map(function() {
  this.resource("posts", function(){
    this.route('show', {path: '/:post_id'}) ;
  });
});

The template which is thesame as the emberjs guides

<script type="text/x-handlebars" data-template-name="posts/index">
  {{#each post in content}}
    <p>{{#linkTo 'posts.show' post}} {{post.title}}  {{/linkTo}}</p>
 {{/each}}
</script>

I looked at this commit that added support for string literals as param for {{linkTo}} and in particular the suggestions below from that commit:

Now, Ember allows you to specify string literals as arguments. {{#linkTo post popular}} would look up the “popular” property on the current context and generate a URL pointing to the model with that ID. While {#linkTo post “popular”}} would treat the string literal “popular” as the model.

  • 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-17T13:51:46+00:00Added an answer on June 17, 2026 at 1:51 pm

    It seems like the only issue was you forget to pass the context to the linkTo posts.edit helper in the posts/show template.

    <script type="text/x-handlebars" data-template-name="posts/show">
      <h1>Post</h1>
      <p>Your content here.</p>
      <h3> {{title}} </h3>
      <h3> {{body}} </h3>
      <br/>
      <p> {{#linkTo 'posts.index'}} back {{/linkTo}}</p>
      <p> {{#linkTo 'posts.edit' content}} Edit the post  {{/linkTo}}</p>  
    </script>
    

    Here is a working fiddle, BTW I’ve cleaned up a bit, some things seemed useless for me.

    http://jsfiddle.net/rxWzu/9/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have http://jsfiddle.net/pF2cF/6/ code with 2 problems: 1. click MyButton doesn't go to clickButton
I have a jsfiddle below: http://jsfiddle.net/Jsh2V/10/ The first sets of test buttons (show it
I have a jsfiddle here which you can use to see a basic demo
I have a jsFiddle here, please open in Internet Explorer and in one other
I have a jsfiddle here which is embedded (Please open in IE and in
I have this JSFiddle which explains my problem. I want the menu items along
I have this working jsfiddle . The EmBlog.PostsEditRoute has a destroyPost event which I
I have: http://jsfiddle.net/Gkz4v/9/ .pagination li a { float: left; width: 6px; height: 6px; line-height:
I have a jsFiddle that I am working with: http://jsfiddle.net/aL7Xe/77/ It all works great,
I have a jsfiddle here : http://jsfiddle.net/hhimanshu/eLhLS/1/ Current: On keypress, it keeps on appending

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.