A
A
Alexander_Sokolov2017-04-01 00:13:39
JavaScript
Alexander_Sokolov, 2017-04-01 00:13:39

How to replace defer in coffeescript?

I had to try coffeescript. Used in conjunction with angular 1. Unable to pass data to function that calls test. Previously, I just used var deferred = $q.defer() and everything was ok, but in coffee, I can't get it to work. Prompt norms a source where it is possible to esteem or simply prompt how it to implement. Thanks in advance
test: (serverUrl) ->
$http.post(serverUrl , {}, timeout: 60000).success (data) ->
console.log data, 'data

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question