Instantly share code, notes, and snippets.

Embed
What would you like to do?
Design Patterns : MV* Pattern
<span data-bind="text : testText"></span>
/**
* @fileoverview The View Model file
* @author hwclass
*/
/**
* testViewModel.js
* This file contains Knockout.js specific observable declerations
*/
'use strict';
//-----------------------------------------------------------
// Public
//-----------------------------------------------------------
/**
* viewModel object
* @noparam
*/
var viewModel = {
testText : ko.observable()
};
ko.applyBindings(viewModel);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment