Home » Posts filed under Angularjs MVC
In this article I try to make a simple example about how to apply angularjs routing for asp.net mvc application. After this you can know how to use angularjs routing and angularjs routing for MVC. Beside that you can know how to rout with parameter, how to use ng-view.
agenda:
- Add MVC application
- Reference angularjs to MVC application
- Add angularjs router and angularjs controller
- Modify _Layout.cshtml and some mvc view to use angularjs.
- Run and see result
Angularjs MVC RESTful Web Service example
This example shows how to create a simply web application using angularjs, mvc, RESTful Web Service and ORM Entity Framework, I named it is “manage customer”.
List of features:
- List customer
- Edit customer
- Create new customer
- Delete customer
List of projects of “manage customer” application:
- CustomerEntities (Entity Framework 6.0.0.0)
- CustomerDAL (c# class library)
- CustomerBLL (c# class library)
- CustomerAPI (RESTful web service)
- CustomerUI (AngularJs, MVC)
Notes that in customer UI will be no C# controller file, it is be replaced by angularjs script file. CustomerAPI will works with CustomerBLL to controll business logic, CustomerBLL reference data layer (CustomerDAL) and CustomerDAL works CustomerEntities to query data.
OK now we focus step by step to know it.
Step 1: Create database for “manage customer” application