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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:23:25+00:00 2026-06-17T16:23:25+00:00

I wanna do something like a progress bar, which will be controlled by ember.

  • 0

I wanna do something like a progress bar, which will be controlled by ember. So in my eyes, there are two and a half ways to achieve this:

  1. Have an observer in the controller, which sets the elements’ width when triggered. Problem: AFAIK, one can’t access DOM-elements from within the controller, i.e. like the way you’d do it in the view this.$('#progress').

  2. Have an observer in the view, which observes the controller’s property. Problem: I don’t know, how to observe (and access) a controller’s property.

  3. (bind the controller’s property via {{bindAttr}} to a freaky data-progress="42" attribute and adjust the elements width whenever the attribute’s value has changed)

  • 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-17T16:23:27+00:00Added an answer on June 17, 2026 at 4:23 pm

    Option 2 is your best bet.

    Problem: I don’t know, how to observe (and access) a controller’s property.

    Ember will set a view’s controller property when the view is created, you can use that to access the controller’s property.

    App = Ember.Application.create();
    
    App.ApplicationController = Ember.Controller.extend({
      percentComplete: '0'
    });
    
    App.ProgressView = Ember.View.extend({
      percentChanged: function() {
        percentString = (this.get('controller.percentComplete') + "%");
        this.$('.bar').css('width', percentString);
      }.observes('controller.percentComplete').on('didInsertElement')
    });
    

    I’ve posted a working example here: http://jsbin.com/hitacomu/1/edit

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

Sidebar

Related Questions

I wanna create queue management system (for bank, hostpital...) Something like that There will
Hey i wanna do something like this: i=2; _root.(process + i)._x = var_Process_Pos_x; how
I wanna do something like this: int main() { try { runApp(); } catch(std::exception
Where to check if type long long is defined? I wanna do something like
Basically all i wanna do is something like this. var myVar = $.load(phpscript.php,var=one); phpscript.php
I wanna do something like this: List<string> list = new List<string>(); ... put some
So i wanna do something like this in php. If i have a year
I'm doing a page with jsf 2.0 and i wanna do something like this:
I wanna implement something like in facebook: after left click on photo, it is
i wanna do something like Document dom = new Document(); Element ele = new

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.