amplify icon indicating copy to clipboard operation
amplify copied to clipboard

Subscribe to event groups (namespaces)

Open bennycode opened this issue 10 years ago • 0 comments

Hi, I am using amplify.store and it's great! But it could become even better, if it would be possible to subscribe to multiple events by using namespace patterns. For example: If want to get notified about a.b.c and a.b.d just by subscribing to a.b. Is this possible?

Here is the code (CoffeeScript) I am running which shows that is not possible at the moment.

amplify.subscribe 'app.feature', ->
  console.log 'Unfortunately I will not be notified :('

amplify.subscribe 'app.feature.event1', ->
  console.log 'I will get notified'

amplify.publish 'app.feature.event1'
amplify.publish 'app.feature.event2'

bennycode avatar Feb 24 '15 22:02 bennycode