简体   繁体   中英

Implication in using Knockout.js in MVC

在我的MVC项目中使用Knockout.js我看到很多很多优点,但在使用它之前我想确保使用相同的方法或使用Knockout.js时要采取的预防措施。

KnockoutJS is included by default starting with ASP.NET MVC4, so it's safe to say that you're going to see it a lot in ASP.NET MVC going forward.

Ultimately there aren't any conflicts of any sort that you have to worry about with Knockout with ASP.NET MVC. It doesn't conflict with any of the DataAnnotations or other auto-scaffolded JavaScript.

You don't get any knockout scaffolding for free (not like DataAnnotations and jQuery validation) so you only use it in instances where you explicitly code it into a view or partial yourself.

I use Knockout heavily in MVC4 and in Node.JS applications and it works great in tandem with jQuery - never ran into any issues with it on either platform.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM