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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:47:34+00:00 2026-06-15T09:47:34+00:00

Edit: Problem was with my own local settings and the way I was including

  • 0

Edit: Problem was with my own local settings and the way I was including the views in my application. Once I fixed those issues, the problem was resolves. The code here is actually correct. The answer Chrixian provided also work.

I am stuck on something that seems rather simple. I want to access some computed properties of my view constructed inside an each loop in handlebars.

<div class='build-buttons-wrapper'>
  <button class="list-builds-button" {{action "toggleBuildsList" target="view"}} ></button>
  <button class="build-button" {{action "buildApp" on="click" target="view"}} >Build</button>
</div>
<div class='builds-list'>
  <h2 class="build-title">Latest builds</h2>
  <ul class="builds-list">
  {{#each content}}
    {{#view Jimux.BuildView buildBinding="this"}}
      <span class="build-date">{{createdAt}}</span>
      <a {{bindAttr href="srcArchive"}} class="download-button source">Source</a>

      {{! *here are different ways I have tried to access "finished" property* }}
      {{log build.view.finished}}
      {{log view.finished}}
      {{log finished}}
      {{log this.finished}}
      {{log build.finished}}

      {{#if build.finished}}
        <div class="build-progressbar"></div>
      {{else}}
        <div class="build-progressbar"><div class="build-percent" style="width:{{unbound percent}}%"></div></div>
      {{/if}}
    {{/view}}
  {{/each}}
  </ul>
</div>

Here is the BuildsView which is using this template:

  Jimux.BuildsView = Em.View.extend({
  templateName: 'builds'
  listVisible: false
  classNames: ['builds-view']
  buildApp: (view, event, ctx) ->
    @get('controller').newBuild()
  ,
  hideList: ->
    @set 'listVisible', false
    this.$(".builds-list").hide("slide", {direction: "up"}, 300)
  ,
  showList: ->
    @set 'listVisible', true
    this.$(".builds-list").show("slide", {direction: "up"}, 300)
  ,
  toggleBuildsList: (view, event, ctx) ->
    if @get 'listVisible' then @hideList() else @showList()
  ,
  didInsertElement: ->
    @hideList() if not @get 'listVisible'

})

And here is the BuildView which is created inside the {{#each}} iterator in the template above.

Jimux.BuildView = Ember.View.extend(
  tagName: 'div',
  classNames: ['build-item'],
  #testBinding: true,
  sample: true,
  finished: ( ->
    return true
    #return (@get 'percent') == 100
  ).property('percent')
)

Everything above works as expected. For example I can access percent property of each child view using {{percent}}. But if I define my own properties inside the Jimux.BuildView as show above, I cant seem to find a way to access them within the handlebars {{#each}} iterator. You can see the different ways I have tried inside the handlebars code with {{log}} statements, all those print undefined in the console. What am I missing here?

  • 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-15T09:47:35+00:00Added an answer on June 15, 2026 at 9:47 am

    I’m assuming the percent property you are referring to is a property of each “content” object you are looping over– if that’s the case making finished look like this:

    finished: (->
        return @get('context.percent') is 100
    ).property('context.percent')
    

    You should be able to simply use {{finished}} within the {{#view Jimux.BuildView}} .. {{/view}} block

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

Sidebar

Related Questions

Ok, I'll put the code first hopefully to make it clearer. ***Edit: Problem is
Edit: I fixed the problem by just starting from scratch. Sorry to waste y'alls
Edit: My problem is fixed thanks to @Grumpy - still, if you have general
[EDIT: Problem solved. Please see my answer below.] In my app I call the
Edit: This problem was down to me passing the wrong view to the Touch
[Edit: This problem applies only to 32-bit systems. If your computer, your OS and
EDIT: This problem has been solved. See below. Hey all. I'm building an iPhone
Edit 1: Uninstalled & Reinstalled Edit 2: Same problem. Seriously? Yes. I am having
Most of you probably know the following problem: You edit an HTML, view the
EDIT I have finally figured out the problem i have been having on my

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.