How can i look at a controller property to assign a classBinding in EmberJS Dynamically
- by j_mcnally
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