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

Chapter 2. KnockoutJS Templates

Once we have built our Catalog, it is time to add a cart to our application. When our code begins to grow, it's necessary to split it in several parts to keep it maintainable. When we split JavaScript code, we are talking about modules, classes, function, libraries, and so on. When we talk about HTML, we call these parts templates.

KnockoutJS has a native template engine that we can use to manage our HTML. It is very simple, but also has a big inconvenience: templates, it should be loaded in the current HTML page. This is not a problem if our app is small, but it could be a problem if our application begins to need more and more templates.

In this chapter, we are going to design our templates with the native engine and then we will speak about mechanisms and external libraries we can use to improve the Knockout template engine.

主站蜘蛛池模板: 明光市| 根河市| 景宁| 广宁县| 辽宁省| 宣化县| 兴城市| 会东县| 封开县| 福安市| 遂平县| 金川县| 班戈县| 贡嘎县| 仪陇县| 松滋市| 定陶县| 台南市| 德阳市| 周至县| 库车县| 望城县| 广元市| 泗阳县| 治多县| 昌宁县| 仙居县| 赫章县| 马鞍山市| 攀枝花市| 延川县| 拉孜县| 阜新市| 江西省| 前郭尔| 武威市| 霍林郭勒市| 许昌市| 海阳市| 安乡县| 如皋市|