Wednesday, 11 September 2013

can't get parameter value out of a trigger event

can't get parameter value out of a trigger event

I have the following code in my backbone view:
this.trigger('item-id-changed', itemId);
and here's the subscriber:
that.shopItemDetailedView = new ShopItemDetailedView({ model: shop });
that.shopItemDetailedView.on('item-id-changed',
that.onModelChange);
in a different view. The question is how do I access the itemId that i
passed during the trigger on the function onModalChanged?

No comments:

Post a Comment