tko icon indicating copy to clipboard operation
tko copied to clipboard

Inconsistent error messages when using multiple bindings

Open tscpp opened this issue 5 years ago • 0 comments

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

tscpp avatar Apr 26 '20 19:04 tscpp