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?