I was trying to make a back-up tutorial.
However, I got an error in "just. Plugging"
var cart = shoppingcart ([]) var cartview = shoppingcartview (cart.contentProperty) var newItemView = NewItemView ( ) Cart.addBus.plug (newItemView.newItemStream)
Error:
Uncheck error: No an overview: [object object] shopBundle.js: 145 AssertObservable shopBundle.js: 2650 bus.plug
I use this type of
- baconjs@0.7.53
- jquery @ 2.13
- Bacon-jquery-bindings@0.2.8
- WebPack 1.7.3
What am I doing wrong? Thank you.
Edit: 2015/3/25
Because it is that the newItemView.newItemStream is not viewable. and newItemView.newItemStream is EventStream Is not all the event stream an observable? NewestSTream has been created: This is the first time the question is when I was missed. / * And, I try a more simple code. This is the only error. /
( newItemView.newItemStream instanceofBacon.Observable
EventStream {takeUntil: function, sample by: function, combine: function , FlatMapLatest: function, fold: function ...}
var $ button = $ ('# addButton'); Var $ nameField = $ ('# nameText'); Var newItemProperty = Bacon $. TextFieldValue ($ nameField) ); Var newItemClick = $ button.asEventStream ('click'); var newItemStream = newItemProperty.sampledBy (newItemClick);
var someStream = Bacon.interval (1000) .map (function () {new date (). GetTime ();}); var bus = new bacon. Bus (); bus.log (); Bus.plug (someStream);
This is caused by "bacon-jquery-bindings" ()
Var requires bacon = ('bacon'); Var $ = jQuery = Requirement ("jquery"); Bacon $ = Is required ("Bacon-Jacqui-Binding");
No comments:
Post a Comment