angular-ui / AngularJS-StyleGuide

Example of scalable architecture for my NG-Conf 2014 talk
http://www.youtube.com/watch?v=Iw-3qgG_ipU
284 stars 53 forks source link

Plug vs Merge #5

Closed thomasstevens89 closed 10 years ago

thomasstevens89 commented 10 years ago

I've got a working demo going successfully and finally got my head around the Bacon streams.

I did have to change https://github.com/ProLoser/AngularJS-ORM/blob/master/modules/Objects.coffee#L10 from upStream.merge( @upStream ) to upStream.plug( @upStream ) though.

I think its something to do with event listeners .onValue(f) defined before the merge() occurs not receiving events from the newly merged bus. Instead .plug() seems to push the events from one bus to the other.

Does that make sense? Or am I completely off?