O'Reilly logo

Getting Started with Knockout.js for .NET Developers by Andrey Akinshin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. A Brief on Knockout MVC References and Features

In this appendix, you will find a quick overview of the main Knockout MVC features. Most of the features are shown in the form of source Razor syntax and generated HTML/JavaScript output. You can use this appendix like a handbook while developing Knockout MVC applications.

Working with KnockoutContext

The main object when forming a View is an instance of the KnockoutContext class. It is necessary to create it at the beginning of the view, using the following line:

var ko = Html.CreateKnockoutContext();

At the end of the view, it is necessary to apply the formed data binding. You can do it in the following way:

@ko.Apply(Model)

If you have a lot of data that needs some time to load, it makes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required