Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

KnockOut.js With Asp.net mvc [closed]

Just started learning the new asp.net mvc4 SPA template , noticed that knockout is being used , so give me reference to any book / Video which describes asp.net mvc with knockout.js from scratch .

like image 562
Ancient Avatar asked May 30 '13 09:05

Ancient


People also ask

What is KnockoutJS in asp net?

Knockout. Js (simply KO) is a powerful JavaScript library which allows developers to bind DOM elements with any data model like array, Json etc.

What activates the knockout?

To activate Knockout, add the following line to a <script> block: ko. applyBindings(myViewModel); You can either put the script block at the bottom of your HTML document, or you can put it at the top and wrap the contents in a DOM-ready handler such as jQuery's $ function.


1 Answers

A really good start is to work through the tutorials step by step on the knockoutjs.com site, the tutorials are brilliantly put together and there are live examples which help to demonstrate "real world" scenarios.

Once you are comfortable with the knockout constructs this article gives a basic but good illustration of integrating pure knockout with MVC controllers, models and views.

An alternative approach is to use knockoutMVC although it is important to point out that this is an extension of knockout.js and is definitely not required to get knockout working really well in an MVC project (I don't use this but thought I would include for completeness).

Finally if you want to get more advanced, this SPA guide is a very useful 4-part tutorial on creating a Single Page Application with Knockout and MVC.

like image 177
connectedsoftware Avatar answered Sep 24 '22 17:09

connectedsoftware