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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:50:48+00:00 2026-06-16T17:50:48+00:00

My question involves the new routing mechanism which was integrated into the master ember.js

  • 0

My question involves the new routing mechanism which was integrated into the master ember.js branch not too long ago.

In the following code block:

App.Router.map(function(match) {
  match("/comments").to("commentsIndex");
});

The ember router now recognizes the comments url, and maps the route handler to commentsIndexRoute via the first parameter of the “to” method (in this case “commentsIndex”). From here you can choose to use the default mappings to the views/templates/controller, or perhaps override them.

However in the following nested route:

App.Router.map(function(match) {
  match("/posts").to("posts", function(match) {
    match("/").to("postsIndex");
    match("/:post_id").to("postShow");
  });
});

I am now unsure what the role is of the first parameter for “to” method in the first match. In other words, I am unsure of the role of the capitalized parameter below:

 match("/posts").to("POSTS", function(match) {

what does that parameter do exactly?

  • 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-16T17:50:49+00:00Added an answer on June 16, 2026 at 5:50 pm

    It seems that this is now the recommended way of embedding “views”.

    From the new Ember documentation:

    Visiting /posts is slightly different. It will first render the posts template into the application template’s outlet. Then, it will render the postIndex template into the posts template’s outlet.

    Finally, visiting /posts/new will first render the posts template,
    then render the newPost template into its outlet.

    http://emberjs.com/guides/routing/defining-your-routes/

    So, .to(“POSTS”) sets the context to load the following views.

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

Sidebar

Related Questions

I have a question which involves calling a function with 2 parameters of a
I have a question which I think involves conditional entropy in the field of
I'm not sure what to call this question, since it involves a variety of
Our MVC3 routing engine has a couple entries which have a constraint which involves
I'm working on single page application, which involves sorting. I use viewModel = new
I have a programming question, as follows, for which my solution does not produce
My question involves this simple walkthrough shown in the article Preserve Size and Location
This question involves 3 tables and 1 form in my Access database. The tables
This is more a general question but my particular case involves a ruby/rails app
This is mostly a data warehouse philosophy question. My project involves an Oracle forms

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.