Skip to content

Comment on Knockout: JS library for rich UIs, declarative bindings, and dependency trackingparent

Comments

Just to be clear -- the "JSON-like binding syntax" includes arbitrary JavaScript code, right? That's how stuff like this works...

    <button data-bind="click: function() { allItems.sort() }, enable: allItems().length > 1">
      Sort
    </button>

It can do in cases where you find that more convenient. Whenever you prefer to move logic into your view model and just reference it, you can do so. It's intended to be flexible.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.