tko
tko copied to clipboard
Inconsistent error messages when using multiple bindings
When using multiple bindings in the same data-bind expression, we get different error messages if we have/have not child bindings.
<span data-bind="let: { item: 'bla' }, foreach: ['1', '2']">
<span data-bind="text: item"></span>
</span>
Vs.
<span data-bind="let: { item: 'bla' }, foreach: ['1', '2']">
</span>
In the first case, we get an error on the text-binding. In the latter case, we get a clear warning that we shouldn't use multiple bindings.
Unfortunately, the first case is likely to be used most of the time.
Example jsfiddle