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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:00:41+00:00 2026-06-12T23:00:41+00:00

In Ember.js documentation it states that you can bind attributes to a Boolean value.

  • 0

In Ember.js documentation it states that you can bind attributes to a Boolean value. However when I try to use either of the below and the value is false it does not apply the provided class names.

<div {{bindAttr class="isEnabled:enabled:disabled"}}>
Warning!
</div>

<div {{bindAttr class="isEnabled::disabled"}}>
Warning!
</div>

Is this functionality no longer available?

  • 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-12T23:00:42+00:00Added an answer on June 12, 2026 at 11:00 pm

    The functionality is still working, and is not deprecated.

    If you can’t make it work, I guess its because you guess isEnabled is a property of the view, but the view rendering context has changed, so you have to write:

    <div {{bindAttr class="view.isEnabled:enabled:disabled">Warning!</div>
    

    I suggest you to read the View context changes gist.

    The code:

    App = Ember.Application.create();
    
    App.FooView = Ember.View.extend({
        templateName: "foo-template"
    });​
    

    The template:

    <script type="text/x-handlebars">
        The disabled view:
        {{view App.FooView isEnabled=false}}
        <br />
        The enabled view:
        {{view App.FooView isEnabled=true}}
    </script>
    
    <script type="text/x-handlebars" data-template-name="foo-template">
        <span {{bindAttr class="view.isEnabled:enabled:disabled"}}>A div</span>
    </script>​
    

    And the JSFiddle is here.

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

Sidebar

Related Questions

How i can use ArrayController in Ember.js 1.0pre? From documentation: MyApp.listController = Ember.ArrayController.create(); raises
I've been scouring for documentation on the REST adapter that is packaged with ember
When I use the Ember Router, how can I define actions in the template
In the documentation of Ember.StateManager it's said that : Inside of an action method
I need to embed a player that can play video files and use subtitles
How can I embed XML in an C# XML documentation comment (e.g. in an
The documentation provides an example: aContainer = Ember.ContainerView.create({ childViews: ['aView', 'bView', 'cView'], aView: Ember.View.create(),
Is that possible to run HornetQ (JBoss JMS implementation) on Tomcat? The HornetQ documentation
here is some documentation generated from activeX, can you explain me what do those
I have discovered Ember.js through this article . A cursory glance at the documentation

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.