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

The Archive Base Latest Questions

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

I’m trying to understand how to use nested routes. My code: App.Router.map(function() { this.route(site,

  • 0

I’m trying to understand how to use nested routes.

My code:

App.Router.map(function() {
  this.route("site", { path: "/" });
  this.route("about", { path: "/about" });
  this.resource("team", {path:'/team'}, function(){
    this.resource('bob',{path:'/bob'});
  });
});

And I’m trying to get to the Bob page with:

{{#linkTo 'bob'}}bob{{/linkTo}}

What am I missing?

jsbin

Thanks.

  • 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-17T21:31:52+00:00Added an answer on June 17, 2026 at 9:31 pm

    try instead

    {{#linkTo 'team.bob'}}bob{{/linkTo}}
    

    Between you can simplify your router map this way – you only need to specify the path if it’s different from the route name.

    App.Router.map(function() {
      this.route("site", { path: "/" });
      this.route("about");
      this.resource("team", function(){
        this.route('bob');
      });
    });
    

    UPDATE

    See a working example here

    In summary, You need to provide an implementation of the renderTemplate function of TeamBobRoute where you explicitly specify where you want to render your template bob. Using the render option into you can override the default behaviour, rendering to the parent outlet, and pick which parent template to render to

    App.TeamBobRoute = Ember.Route.extend({
      renderTemplate:function(){
        this.render('bob',{
          into:'application',
        });
      }
    });
    
    <script type="text/x-handlebars" data-template-name="site-template">
      This is the site template
        {{#linkTo 'about'}}about{{/linkTo}}
         {{#linkTo 'team'}}team{{/linkTo}}
    </script>
    
      <script type="text/x-handlebars" data-template-name="about">
      This is the about page
    </script>
    
        <script type="text/x-handlebars" data-template-name="team">
      This is the team page
        {{#linkTo 'team.bob'}}bob{{/linkTo}}
    </script>
    
      <script type="text/x-handlebars" data-template-name="bob">
      This is the bob page
    </script>
    
    <script type="text/x-handlebars">
      This is the application template
      {{outlet}}
    </script>
    

    FYI the render method supports the following options: into, outlet and controller as described below.

    The name of the PostRoute, as defined by the router, is post.

    By default, render will:

    • render the post template
    • with the post view (PostView) for event handling, if one exists
    • and the post controller (PostController), if one exists
    • into the main outlet of the application template

    You can override this behavior:

    App.PostRoute = App.Route.extend({
      renderTemplate: function() {
        this.render('myPost', {   // the template to render
          into: 'index',          // the template to render into
          outlet: 'detail',       // the name of the outlet in that template
          controller: 'blogPost'  // the controller to use for the template
        });
      }
    });
    

    If you had a named template inside your application template then you would target it this way

    App.TeamBobRoute = Ember.Route.extend({
      renderTemplate:function(){
        this.render('bob',{
          into:'application',
          outlet:'team-member',
        });
      }
    });
    
    <script type="text/x-handlebars">
      This is the application template
      {{outlet 'team-member'}}
      {{outlet}}
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.