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 9125155
In Process

The Archive Base Latest Questions

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

I have been trying the new Router and the new Ember code (Version: v1.0.0-pre.2-366-g4772b18),

  • 0

I have been trying the new Router and the new Ember code (Version: v1.0.0-pre.2-366-g4772b18), and I am in a bit of a trouble. I want to do a simple thing: when I click a link, it should navigate away to that state.

But instead I get this error:

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

To trigger the error, click the big red title. The first one on the top – the one that says ‘Ember Ready’.

I have no JSFiddle, but you can check the live site here: http://eduardmoldovan.com/ I have basically pushed the same code there.

My code:

var Ngin = window.Ngin = Ember.Application.create({
    ready: function() {
        "use strict";
        this.set("Router.enableLogging", true);
        this.set("Router.location", "history");
    },
    customEvents: {
        blur: "blur",
        paste: "paste",
        changed: "changed"
    }
});

DS.RESTAdapter.configure("plurals", {
    article: "article"
});

Ngin.Store = DS.Store.extend({
    revision: 11,
    adapter: DS.RESTAdapter.create({
        namespace: "private-api",
        bulkCommit: true
    })
});

Ngin.Article = DS.Model.extend({
    title: DS.attr("string"),
    lead: DS.attr("string"),
    url: DS.attr("string"),
    pubdate: DS.attr("date"),
    channel: DS.attr("string")
});

Ngin.IndexController = Ember.ObjectController.extend({
    content: [],
    goToArticle: function() {
        "use strict";
        this.get('target').transitionTo("article");
    }
});
Ngin.IndexModel = DS.Model.extend({});

Ngin.ApplicationView = Ember.View.extend({
    templateName: "page"
});

Ngin.Router.map(function(match) {
    "use strict";
    match("/").to("index");
    match("/technical/:url/").to("article");
});

Ngin.IndexRoute = Ember.Route.extend({
    setupController: function(controller) {
        "use strict";
        var all,
            latestOne,
            latestList;
        latestOne = Ngin.Article.find({
            filter: 'latest-one'
        });
        latestList = Ngin.Article.find({
            filter: 'latest-list'
        });
        controller.set('latestOne', latestOne);
        controller.set('latestList', latestList);
    },
    renderTemplate: function() {
        "use strict";
        this.render("header", {
            outlet: "header"
        });
        this.render("index", {
            outlet: "content"
        });
        this.render("footer", {
            outlet: "footer"
        });
    }
});


Ngin.ArticleRoute = Ember.Route.extend({
    model: function(params) {
        "use strict";
        console.log('ede');
        return Ngin.Article.find(params.url);
    },
    setupController: function(controller) {
        "use strict";
    },
    renderTemplate: function() {
        "use strict";
    }
});

$("body div").remove();

Ngin.initialize();

And a simple action like this: {{action goToArticle}}

I don’t really understand who wants to call what. Any idea on this? I have been looking for answers or examples, but haven’t been lucky with that.

  • 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-17T06:44:16+00:00Added an answer on June 17, 2026 at 6:44 am

    Your problem is that you’re calling transitionTo without supplying a model.

    Ember is trying to transition to the article route. In order to do that, it needs to generate value of :url dynamic segment. In order to get that, it passes the model that you pass as the second parameter to transitionTo to the route’s serialize method.

    The default serialize method tries to fill in the dynamic segment with the id property of the model.

    Your action is:

    {{action goToArticle}}
    

    It should be:

    {{action "goToArticle" article}}
    

    Then, you need to update your IndexController to take the parameter:

    Ngin.IndexController = Ember.ObjectController.extend({
      content: [],
        goToArticle: function(article) {
          this.transitionTo("article", article);
        }
    });
    

    All of that said, you really should be using a link here, not an action. That would handle everything for you:

    {{#linkTo "article" article}}{{article.title}}{{/linkTo}}
    

    You can learn about the link helper and the action helper in the Ember guides.

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

Sidebar

Related Questions

I'm a bit new to js and have been trying to figure out how
I have been trying to install a new version of Sonar, however after this
I have been trying to create a new google custom search engine, but when
i am new kernel programming.i have been trying to load this driver program for
I'm new to Python and I have been trying to search through html with
I've been trying this: NSNumberFormatter *testNumber=[NSNumberFormatter new]; if (![testNumber numberFromString:someNSString]) I have been told
I am new to using Eclipse and CDT and have been trying to get
hey people I'm new at jquery and i have been trying to figure this
I am new to programming. I have been trying to write a function in
I am new to C# .NET. I have been trying since 2 days, but

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.