Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ply.ui.define('html', {
__elements: {
body: 'body'
},
__partials: {
body: 'body'
},
__notifications: {
'my-note': 'callback'
},
callback: function () {
console.log(this.name);
}
});
Ply.ui.define('body', {
__notifications: {
'my-note': 'callback'
},
callback: function () {
console.log(this.name);
// ignore and add new listner.
Ply.core.ignore(this.notifications['my-note']);
Ply.core.listen('my-note', function () {
console.log('This function will incorrectly replace the html views callback.');
}, this);
}
});
Ply.ui.register('html', { view: 'html' });
Ply.core.notify('my-note');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.