Due to the complexity that comes with data binding design patterns, there are some standalone JavaScript libraries, such as Rivets.js and Knockout.js, that can provide it for you. Many full-fledged JavaScript frameworks also include their own implementations of data binding as a core feature.
AngularJS, which is maintained by Google, is one of the most popular modern JavaScript frameworks. As discussed in Chapter 2, Model-View-Whatever it is a self-avowed MVW framework. In addition to its MVW architectural pattern implementation, it includes a powerful data binding design pattern, which is often its most touted feature.
One-way data binding with AngularJS is achieved when an expression in the View is populated by a value from the Model associated with the Controller for that View. Consider the following Controller and Model data:
var myApp = angular.module('myApp', []); myApp.controller...