Category: Razor

Maintaining session info in AngularJS when you refresh the page

EDIT: This article has proved to be the most popular article on my site, but I thought it was a bit “rambly” and also the code examples were out of date. So this is the March 2016 Remix with added

Tagged with: , , , , , ,

Binding Razor forms to an AngularJS model with Html.TextBoxFor()

I was hooking up my login page work with angular, but wanted to keep the MVC model authentication (because it works and I like it). So I tried this: @Html.TextBoxFor(m => m.userName, new { ng-model = “logon.userName” }) Surprisingly this

Tagged with: , , , , ,
Top