0

I've been trying to get something like the following working:

var showAjaxIndicator = ajaxRequest.awaiting(ajaxResponse)

What I'm seeing however is that showAjaxIndicator will finish on true -- I do not see a final false when the request has finished / ended.

Here's a JSFiddle of what I'm doing: http://jsfiddle.net/umx2sjsj/2/

What am I missing here?

jsleeuw
  • 283
  • 5
  • 13

1 Answers1

0

I think your problem is with Bacon.once - it works synchronously which is different from normal streams. This is often the problem when you are trying stuff out in jsfiddle.

I forked your fiddle to a new one with Bacon.later(0, call) instead of Bacon.once(call), this solves the problem.

JsFiddle: http://jsfiddle.net/wbf8v39k/

OlliM
  • 7,023
  • 1
  • 36
  • 47