Created
September 23, 2014 23:24
-
-
Save jstrimpel/1927b32d95fbf13d3a8f to your computer and use it in GitHub Desktop.
lazo: passing models to child components
This file contains 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
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