Skip to content

Instantly share code, notes, and snippets.

@jstrimpel
Created September 23, 2014 23:24
Show Gist options
  • Save jstrimpel/1927b32d95fbf13d3a8f to your computer and use it in GitHub Desktop.
Save jstrimpel/1927b32d95fbf13d3a8f to your computer and use it in GitHub Desktop.
lazo: passing models to child components
define(['lazoCtl'], function (LazoCtl) {
'use strict';
return LazoCtl.extend({
index: function (options) {
this.addChild('some-target', 'some-component', {
// pass all references or cherry pick the ones you want
ctx: {
models: this.models,
collections: this.collections
},
success: function (child) {
options.succes('index');
},
error: options.error
});
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment