Skip to content

Instantly share code, notes, and snippets.

@JasperTey
Last active August 29, 2015 14:15
Show Gist options
  • Save JasperTey/98aeadc8e377d5043698 to your computer and use it in GitHub Desktop.
Save JasperTey/98aeadc8e377d5043698 to your computer and use it in GitHub Desktop.
In Knockout 3.3.0, how do I specify the new sync param when registering components via the "single AMD module" pattern?
/*
* How to use the sync param when registering components via AMD?
*/
// In the register call?
ko.components.register('module', {require: 'path/to/module', sync: true});
// Or in the module's return value?
return {viewModel: Model, template: htmlString, sync: true};
// Or does this not apply to AMD loaded components at all?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment