Skip to content

Instantly share code, notes, and snippets.

@jakecraige
Created December 4, 2013 22:26
Show Gist options
  • Save jakecraige/7796739 to your computer and use it in GitHub Desktop.
Save jakecraige/7796739 to your computer and use it in GitHub Desktop.
$scope.$watch 'invites', ()->
selected = _.map $scope.invites, (ele, index)->
parseInt(index) if ele is true
$scope.invitesPrepared = _.compact selected # remove undefined's
$scope.inviteLength = $scope.invitesPrepared.length
, true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment