官术网_书友最值得收藏!

  • Mastering KnockoutJS
  • Timothy Moran
  • 209字
  • 2021-08-05 17:13:13

Chapter 2. Extending Knockout with Custom Binding Handlers

Knockout's standard bindings are great. They solve most of the general problems you are likely to encounter when developing web apps. But there is always the need to provide something special, whether you are working on your own library or just trying to add a bit of style to your app. When that happens, you will want to provide that functionality through the same binding system you are using everywhere else. Luckily, Knockout makes extending this system easy. In this chapter, we will be looking at how to make our own binding handlers. We will be covering the following topics:

  • What a binding handler contains
  • Creating new binding handlers
  • Using custom binding handlers to integrate with third-party libraries
  • Managing binding contexts
  • Using the containerless control flow syntax with custom bindings

Creating custom binding handlers for new and more complex HTML interactions is a key to developing feature-rich applications. While the basics are easy to learn, there are enough extension points to support just about any use case. We are going to be looking at plenty of examples to get a solid idea of what binding handlers are capable of and how we can make the best use of them.

主站蜘蛛池模板: 沁源县| 铁岭市| 阿拉尔市| 诏安县| 寻乌县| 白朗县| 博乐市| 光山县| 杭锦后旗| 定州市| 肇东市| 大同县| 河间市| 玉屏| 紫阳县| 库车县| 顺昌县| 永靖县| 项城市| 太原市| 渭源县| 云林县| 巩义市| 休宁县| 六枝特区| 江北区| 江西省| 会宁县| 迁西县| 东方市| 平利县| 综艺| 海盐县| 内乡县| 西峡县| 稷山县| 吐鲁番市| 榆树市| 太康县| 嘉峪关市| 镇巴县|