mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 06:27:02 +03:00
KnockoutJS scramble createChildContext
This commit is contained in:
parent
47cd902369
commit
4ee00d30ae
4 changed files with 5 additions and 5 deletions
|
|
@ -122,7 +122,7 @@
|
|||
// This will be called by setDomNodeChildrenFromArrayMapping to get the nodes to add to targetNode
|
||||
var executeTemplateForArrayItem = (arrayValue, index) => {
|
||||
// Support selecting template as a function of the data being rendered
|
||||
arrayItemContext = parentBindingContext['createChildContext'](arrayValue, {
|
||||
arrayItemContext = parentBindingContext.createChildContext(arrayValue, {
|
||||
'extend': context => context['$index'] = index
|
||||
});
|
||||
|
||||
|
|
@ -247,7 +247,7 @@
|
|||
// Render once for this single data point (or use the viewModel if no data was provided)
|
||||
var innerBindingContext = bindingContext;
|
||||
if ('data' in options) {
|
||||
innerBindingContext = bindingContext['createChildContext'](options['data'], {
|
||||
innerBindingContext = bindingContext.createChildContext(options['data'], {
|
||||
'exportDependencies': true
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue