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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:52:53+00:00 2026-06-12T09:52:53+00:00

Today I was reading Trek’s tutorial for the fourth time, hoping that I would

  • 0

Today I was reading Trek’s tutorial for the fourth time, hoping that I would get it this time (don’t get me wrong, it is an awesome resource, but I am new to client side development in general and find that tutorial geared more toward experts). Anyway, I noticed this block of code:

<script type="text/x-handlebars" data-template-name="contributors">
  {{#each person in controller}}
    {{person.login}}
  {{/each}}
</script>

It seems obvious that here we iterate trough items in controller and refer to them as person inside each iteration. But where does the controller reference come from? Is this some special keyword that is defined by Ember and made available in the context of each view?

If controller is a special reference made available by Ember, I would like to know more about how it works. Can you point me to documentation or even Ember source where such keywords are defined so that I can learn what other references are available from inside a view and how do they work?

  • 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-12T09:52:55+00:00Added an answer on June 12, 2026 at 9:52 am

    No, it’s not a special keyword, it’s just a property of the view which is set when using the connectOutlet method described below:

    index: Ember.Route.extend({
      route: '/',
      connectOutlets: function(router){
        router.get('applicationController').connectOutlet('allContributors', [
          {login:'wycats'},
          {login:'tomdale'}
        ]);
      }
    })
    

    If you read below your example, you see:

    Controllers have the ability to connect outlets in the views they control. In the above example, I’m calling connectOutlet with ‘allContributors’ as an argument. This will create an instance of AllContributorsView for us, set the shared instance of AllContributorsController as the view’s default rendering context, and insert it into our view hierarchy at the point where {{outlet}} appears in the application template. The second argument, which I’ve hard coded as an array of two object literals, is set as the content of the controller instance.

    So the connectOutlet method:

    • Create an instance of AllContributorsView
    • Set the AllContributorsController as the view’s default rendering context (it means that the controller property of the view is set to App.router.allContributorsController, because the default view rendering context is its controller, or its parent view context when no controller is set, see the view context source code.
    • Insert the view where the {{outlet}} appears
    • Set the content of the AllContributorsController instance (here [{login:'wycats'}, ...])

    I suggest you to read entirely the article and then try to do it yourself.
    There are also a lot of Ember resource you could read, see this StackOverflow answer.

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

Sidebar

Related Questions

Today, reading Servlet 3.0 specification, I've come across a sentence: We emphasize that this
I was reading today about OOCSS which says by using that approach have 2
While reading proggit today, I came upon this comment in a post about how
I was reading this today: http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#default-parameter-values and I can't seem to understand what's happening
I was reading Joel On Software today and ran across this quote : Without
I started reading about underscore.js today, it is a library for javascript that adds
I was reading today about researchers discovering that NVidia's Phys-X libraries use x87 FP
I came across this code today whilst reading Accelerated GWT (Gupta) - page 151
I was reading this article today on two different regular expression algorithms. According to
I was reading something today and came across a statement that said: Lazy instantiation

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.