问题描述
在它说:
使一个方便的事件调度程序可以协调应用程序的不同区域之间的事件: var dispatcher = _.clone(Backbone。事件)
To make a handy event dispatcher that can coordinate events among different areas of your application: var dispatcher = _.clone(Backbone.Events)
任何人都可以解释如何实现调度员从一个视图到另一个视图进行通信?
Can anyone explain how to implement the dispatcher to communicate from one view to another? Where do I have to place the code in my app?
推荐答案
这是一篇关于使用。
你可能会有某种App Controller对象,这将控制流程的应用程序,创建视图,模型等。这也是事件聚合器的好地方。
You will probably have some kind of App Controller object, which will control the flow of the app, creating views, models, etc. This is also a good place for the event aggregator.
从我的角度来看,我认为这篇文章解释了很好。
From my point of view, I think that article explains it pretty well.
这篇关于backbone.js - 使用事件调度器var dispatcher = _.clone(Backbone.Events)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!