SHARE
TWEET

Untitled

a guest Oct 17th, 2018 135 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.EventRosterCtrl = ($scope, subevent, addresses) ->
  2.     $scope.subevent = subevent
  3.     $scope.addresses = addresses
  4.  
  5. EventRosterCtrl.resolve =
  6.     subevent: (SubEvent, User, $route) ->
  7.         SubEvent.get {subevent_id: $route.current.pathParams.subevent_id}
  8.  
  9.     addresses: (User) ->
  10.     # how do you get subevent called first and how would you access it here?
  11.         for participant in subevent.participants
  12.             User.get {user_id: participant.user}, (user) ->
  13.                 addresses[participant._id] = user.address
  14.  
  15.     delay: ($q, $timeout) ->
  16.         deferred = $q.defer()
  17.         $timeout deferred.resolve, 1000
  18.         return deferred.promise
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top