Types of Bindings in Knockout js

Primarily there are SIX type of bindings.

  1. Controlling text and appearance
  2. Control flow
  3. Working with form fields
  4. Rendering templates
  5. Binding syntax
  6. Creating custom bindings
  1. Controlling text and appearance
    1. Knockout bindings visible, hidden, text, html, class, css, style, attr are called controlling and appearance type.
  2. Control flow
    1. Bindings such as foreach, if, ifnot, let, with, using, component, binding lifecycle events (it contains subscribe, component, childrenComplete, descendantsComplete etc..)
  3. Working with form fields
    1. All form events of form click, event, submit, enable, disable, value, textInput, hasFocus, checked, options, selectedOptions, uniqueName.
  4. Rendering templates
    1. Template binding which render other knockout observables and components.
  5. Binding syntax
    1. knockout uses data-bind for binding. Second is binding context which we will learn in-depth in upcoming articles.
  6. Creating custom bindings
    1. Knockout default has events binding such click, submit etc. In case, if you wanted such custom event, observable, or any component.

Leave a Reply