3 ms·
Well.. Part one was kind of useless. This should have been a paragraph in the part two article where you actually show how to build the one page web app.
by xxchan 14y ago
Well.. Part one was kind of useless. This should have been a paragraph in the part two article where you actually show how to build the one page web app.
- skilesare 14y agoHere you go: http://jsfiddle.net/skilesare/J9Jyx/ http://jsfiddle.net/skilesare/J9Jyx/ <html> <head> <script type='text/javascript' src='knockout-2.2.1.js'></script> </head> <body> <!-- This is a view - HTML markup that defines the appearance of your UI --> <p>First name: <strong data-bind="text:firstName">todo</strong></p> <p>Last name: <strong data-bind="text:lastName">todo</strong></p> <script type="text/javascript"> // This is a simple viewmodel - JavaScript that defines the data and behavior of your UI function AppViewModel() { this.firstName = "Bert"; this.lastName = "Bertington"; } // Activates knockout.js ko.applyBindings(new AppViewModel()); </script> </body> </html>