Type your name



  • Following is demonstrated as part of hello world demo:
    1. ViewModel used to represent data and operations on a UI
    2. Declarative data binding used to create an associated view
    3. Activating Knockout
  • A ViewModel represents data/properties and operations/methods on a UI. ViewModel can be represented using one of the following technique:
    var myViewModel = {
    	name: 'Krishna'
    // Following is another way
    function myViewModel() {
    	name: 'Krishna'
  • directive "data-bind" is used to bind the input with a property of ViewModel object. Following is how name property is bound with UI (view).
    <input data-bind="value: name"/>