Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
WEB APP TESTING USING KNOCKOUT.JS

You're reading from   WEB APP TESTING USING KNOCKOUT.JS Design, implement, and maintain a fully tested JavaScript web application using Knockout.JS

Arrow left icon
Product type Paperback
Published in Nov 2014
Publisher
ISBN-13 9781783982844
Length 154 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Roberto Messora Roberto Messora
Author Profile Icon Roberto Messora
Roberto Messora
Arrow right icon
View More author details
Toc

Data-binding in detail

The main objective of a web application is to present some data and eventually react to user inputs. In the previous sections, you learned that the Model-View-ViewModel strategy is to hold the data (the Model) and commands in a pure-code representation of the View called ViewModel. We also briefly scratched the surface of the data-binding mechanism that permits the connection between the ViewModel and HTML markup.

In this section, we will review the Knockout.JS built-in data-binding types. There are many ways to present information on a web page. There are plenty of elements in HTML that need a way to bind the ViewModel properties and commands.

The data-binding syntax

In Knockout.JS, we talk about declarative data-binding because we need to place the data-bind attributes inside the HTML tags, and specify what kind of binding is associated to a ViewModel property/command.

The attribute value must follow a specific syntax in order to allow Knockout.JS to decode its content...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image