How can i look at a controller property to assign a classBinding in EmberJS Dynamically

Posted by j_mcnally on Stack Overflow See other posts from Stack Overflow or by j_mcnally
Published on 2012-03-23T15:58:01Z Indexed on 2012/03/23 17:30 UTC
Read the original article Hit count: 290

Filed under:

So far this is not working. Althrough the property should return true on my first page

Props form GWVideoApp.VideosController

isFirst: function() {
    return this.currentPage == 1;
}.property(),
isLast: function() {
    return this.currentPage == this.pages;
}.property(),

View:

{{#view Ember.Button target="GWVideoApp.VideosController" classBinding="GWVideoApp.VideosController.isFirst:hide" tagName="li" action="prevPage"}}Prev{{/view}}

When currentPage value changes the classBindings to do not

© Stack Overflow or respective owner

Related posts about emberjs