ASP.Net MVC validation with Angular VS Razor

user3864332

ASP.Net MVC together with Custom Attributes in your model and with Razor, lets you just write an HTML Helper like @Html.ValidationMessageFor(model => model.MyAttribute) to validate each field.

AngularJS intends to render everything on the client side, so we don't have access to Razor and all the javascript validators generated for free. We have to code everything again by hand, and we don't have the guarantee that this validation is in sync with the server side validation, which we had with Razor.

How will we overcome this GAP?

user3864332

This solves my problem:

https://github.com/alisabzevari/ngval

If we want to go deeper (which I don't need now), we can have this:

https://bitbucket.org/asiemer/angularjs.mvc/wiki/Home

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related