RailsCasts Pro episodes are now free!

Learn more or hide this

Stan Bondi's Profile

GitHub User: sdbondi

Comments by Stan Bondi


Hi Ryan,

Thanks for the frontend framework episodes!

In the EmberJs app there was one feature not included in the AngularJs app - disabling the button if all entries are winners.

I implemented that in Angular easily by using ng-disabled="allWinners()" on the button and controller code

$scope.allWinners = ->
  for entry in $scope.entries
    return false unless entry.winner

however I noticed that it was being called a lot (4 times on load and everytime a character is entered in the textbox).

Is there a way in Angular to only call a bound function when a property is updated, much like Ember does?