Im using MVC and I am trying to use the introduction tutorials on http://learn.knockoutjs.com/#/?tutorial=intro I would like to implement them in Visual studio though. Im not exactly sure how to do this...
So I create a JS file:
// 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());
And my View:
<!-- This is a *view* - HTML markup that defines the appearance of your UI -->
<p>First name: <strong>todo</strong></p>
<p>Last name: <strong>todo</strong></p>
But I need to create a model and a controller as usual? or just a view and a JS file?
Please advice not sure how this works