X

Geertjan's Blog

  • January 15, 2015

Knockout.js in 2 Minutes (Part 1)

Geertjan Wielenga
Product Manager

Scratching your head over Knockout.js? Spend two minutes getting your feet wet here:

Code:

<script src="js/libs/knockout/knockout-min.js" type="text/javascript"></script>
Name: <input data-bind="value: name, valueUpdate:'afterkeydown'" />
<h3>
Hello, <span data-bind="text: name"></span>.
</h3>
<script type="text/javascript">
var viewModel = {
name: ko.observable('John')
};
ko.applyBindings(viewModel);
</script>

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha