O'Reilly logo

KnockoutJS Web Development by John Farrar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Using Arrays, Nesting, and Grids

Now we've had a taste of KnockoutJS, we are now ready to learn new coding skills. In this chapter, we will see how to extend our MVVM skills to make a lot more sweet data interaction experiences. This chapter will focus on:

  • Conditional binding
  • Simpler nested binding
  • Observable arrays
  • Paged grids
  • Sorting data collections

Conditional binding

Data binding is the essence of many new libraries that interact with the HTML markup as it gets converted to the DOM. We saw binding in Chapter 1, Getting Started with KnockoutJS, using the data-bind ="..." bindings. Here we will be looking at conditional binding.

The first thing we will do is understand the concept of conditional binding. Our example is meant to be conceptual. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required