知道为什么在编译时会出错?
(window) ->
# pubsub
App.publish = (topic,args) ->
App.subscriptions[topic] and $.each(App.subscriptions[topic], ->
this.apply(App, args or [])
答案 0 :(得分:0)
没关系,我很傻,忘了删除paren:\
(窗口) - >
# pubsub
App.publish = (topic,args) ->
App.subscriptions[topic] and $.each App.subscriptions[topic], ->
this.apply(App, args or [])