alsotang / node-lessons

:closed_book:《Node.js 包教不包会》 by alsotang
16.54k stars 4.7k forks source link

lesson4 eventproxy 顺序问题 #64

Closed cpoopc closed 9 years ago

cpoopc commented 9 years ago

获取首页的列表后,再获取详情页的信息.使用eventproxy无法保证顺序,是按获取详情页的数据后emit的顺序来的. 如果想要按首页获取到的列表顺序,是否有什么办法可以做到?

albin3 commented 9 years ago

@cpoopc 可以用after+group保证顺序 文档,http://html5ify.com/eventproxy/api.html#eventproxy__after

cpoopc commented 9 years ago

@albin3 thanks!!

cpoopc commented 9 years ago

@albin3 ...看了下,不懂怎么用....汗 刚学js,不太懂

albin3 commented 9 years ago

@cpoopc 之前写的例子…你看一下… https://github.com/albin3/eventproxy-example