I have a promise here:
myPromise: ->
return new Em.RSVP.Promise (resolve, reject) ->
# ...
resolve 5
How do I write a function to return the promise from myPromise()
?
This is what I've tried:
myPromise2: ->
return myPromise()
myPromise2().then ->
console.log 'this is never called!'
I figured it out!