Debugging Knockout Model Bindings
If you've ever found yourself wondering what is going on with your Knockout bindings, add the following to your markup.
<pre data-bind="text: ko.toJSON($data, null, 2)"></pre>
You can give it a different binding context ($data) as well, so if you only care about a specific section of your bindings you can limit what this debug output to only that.
Written by Steve Duitsman
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Knockoutjs
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#