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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:50:53+00:00 2026-06-15T04:50:53+00:00

I just stumbled over emberJS and thought it would be worth trying it out

  • 0

I just stumbled over emberJS and thought it would be worth trying it out for my next web application.

What I actually plan to do is showing a list of objects in a 2-dimensional way (atm this can be a table).

What I have so far:

<script type="text/x-handlebars">
<table width="100%" style="text-align:left">
  <tr>
    <th>
    </th>
    {{#each App.MyController.getColumnValues}}
      <th>{{this}}</th>
    {{/each}}
  </tr>
  {{#each App.MyController.getRowValues}}
    <tr>
      <th>{{this}}</th>
      {{#each App.MyController.getColumnValues}}
        {{view App.CountView rowBinding="this" columnBinding="../this"}}
      {{/each}}
    </tr>
  {{/each}}
</table>
</script>

and for the countView:

<script type="text/x-handlebars" data-template-name="countView">
  <td>{{view.row}} - {{view.column}}</td>
</script>

As you may see, I want a table having in each cell the value of the current column AND row.
Everything works, except of the columnBinding. As I read on Handlebars’ page {{../this}} is the way to address a parent template scope. In the two curly braces (without creating an extra view for it, this works pretty fine.
But I later need to call a function passing it the column and row value and thought (to make it lucid) a view would be nice at this point.

Any ideas how to access the parent template scope and pass it to the countView?

  • 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-15T04:50:54+00:00Added an answer on June 15, 2026 at 4:50 am

    In order to avoid confusion you can always use variables in {{each}} block as in this case, you might try this way:

    {{#each row in App.MyController.getRowValues}}
      <tr>
        <th>{{row}}</th>
        {{#each column in App.MyController.getColumnValues}}
          {{view App.CountView rowBinding="row" columnBinding="column"}}
        {{/each}}
      </tr>
    {{/each}}
    

    Let me know if this helps…

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

Sidebar

Related Questions

I just stumbled over a small problem when extending javascript objects using jQuery. When
I just stumbled over a very interesting problem. Giving the following code: using System;
Have just started playing with ASP.NET MVC and have stumbled over the following situation.
I just converted a code snippet from VB.NET to C# and stumbled over this
I just stumbled over this in some C# code...: public Foo Foo { get;
I just stumbled over the following line of code cout << &Blahh << endl;
WPF DataBindings used to make me happy. One thing I've stumbled over just now
I'm just starting to learn JavaScript, and stumbled over Underscore.js and jQuery . Underscore
I just stumbled over a weird piece of code while refactoring. It looks like
I've just stumbled over a line in Java 6 which function is not clear

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.