Created
November 9, 2012 20:43
-
-
Save adamyanalunas/4048124 to your computer and use it in GitHub Desktop.
Abstracting event names from broker calls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.events = { | |
data: { | |
}, | |
ui: { | |
main: { | |
channel: 'ui.main', | |
topics: { | |
layoutLoaded: 'layout.loaded' | |
} | |
} | |
} | |
}; | |
app.broker.channel( | |
app.events.ui.main.channel, | |
app.events.ui.main.topics.layoutLoaded | |
).publish(''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would be cooler if this was generated (and re-generated) and
channel
topics were automatically scoped.