Sometimes I get an error like this:
Uncaught Error: Unable to parse bindings.
Message: ReferenceError: items is not defined;
Bindings value: foreach: items()
I'm pretty satisfied with my current way of debugging binding faults - see this answer.
Problem is that I sometimes don't know what element to debug. I use the propertyname items()
everywhere in my project for different contexts.
Right now the only thing I can do to find the element is searching through my whole project for foreach: items()
and replace it for debug: $data
.
Is there some way to find the element after a throw?
Is there a way to let Knockout.js throw the element's xpath during a binding fault?