Skip to content

Instantly share code, notes, and snippets.

@richardscarrott
Last active December 11, 2015 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardscarrott/4558947 to your computer and use it in GitHub Desktop.
Save richardscarrott/4558947 to your computer and use it in GitHub Desktop.
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