This sample of code is meant to demonstrate how to use AngularJS with TypeScript to fetch data via AJAX in a C# MVC environment. It also allows sending route data via AJAX to a method in C# BaseController that will find the route and redirect the user to that route.
What is provided:
- AngularJS Controller
- AngularJS Service
- AngularJS Model
- C# MVC Controller
- C# MVC BaseController that handles AJAX requests as well as: -- writing of route data into the HTML -- redirecting in MVC by accepting route data from AngularJS
- HTML View with a simple RAZOR code that outputs route data from C# BaseController
Full blog post coming soon at http://yolonerds.com