Developing ANGULARJS applications with ASP. NET 5

Source: Internet
Author: User
Tags sublime text

Today's recommendation is a series of articles on how to use ASP. 5来 to develop ANGULARJS applications, altogether 7 articles.

In Visual Studio 2015, it is more convenient to develop applications such as ANGULARJS by optimizing the project structure and optimizing the reference way of the front-end JS framework.

This series of articles on how to use ASP. 5来 to develop ANGULARJS applications is divided into 7 sections, respectively:

  1. Configure Grunt, Uglify, and Angularjs. The approximate steps are. 1) How to create in an empty web App project. 2) Use NPM to install the grunt actuator and its tasks (Grunt-contrib-uglify,grunt-contrib-watch). 3) Use Bower to install the Angularjs library. 4) Use Grunt to merge and deploy the JS files in the app folder you have written to the Wwwroot folder.
  2. Use the MVC 6 WEB API. The approximate steps are: 1) enable the MVC 6 feature (add references in the Project.json file and call the Addmvc method in the startup file). 2) Create a sample entity model. 3) Create a controller for the Web API. 4) Use the built-in template to create the Angularjs app (also known as module). 5) Create a controller for the ANGULARJS. 6) Create a ANGULARJS service to invoke the Web API. 7) Create a Angularjs view template.
  3. Add client routes. The approximate step is: 1) Add the client route definition. 2) rewrite the request route on the server. 3) Controller that modifies the client's angularjs for routing. 4) Create a layout view. 5) Create a list, add, edit, and delete views.
  4. Use the Entity Framework 7. The data returned by the previous server is dynamically built by code. You now need to persist to the database. So the approximate steps are: 1) Add the EF7 NuGet package. 2) Create DbContext. 3) Register the EF service in startup. 4) Update the controller of the Web API to manipulate the data using DbContext. 5) Perform EF7 initialization and data migration.
  5. Perform validation of form data. The approximate steps are: 1) implement client-side validation using ANGULARJS. 2) Update the entity model to implement server-side validation. 3) Upgrade the database. 4) Complete the controller of the Web API to consider the data validation situation. 5) Complete the ANGULARJS controller to display the validation hints returned by the server.
  6. Achieve security control. This article describes the use of ASP. NET identity to assign different permissions to different users. The approximate steps are: 1) enable ASP. 2) Edit DbContext inherit Identitydbcontext. 3) force the user to log in. 4) Pass the declaration data to Angularjs. 5) security control of the action in the controller of the Web API (add authorize tag).
  7. Run the app on your Mac. Describes how to successfully run an ASP. NET 5 application on a Mac. The approximate steps are: 1) to install mono. 2) Install KVM with homebrew. 3) clone the code via git on your Mac. 4) Use sublime text to open and edit the code. 5) because there is no SQL Server on the Mac, use EF7 's in-memory provider to emulate an in-memory database. Of course, you can also use SQLite or a remote database server. 6) Use Kestrel to replace the IIS hosting app. 7) Restore all required nuget packages before running. 8) How to start and stop Kestrel.

This family of files is not only an introduction to the ASP. NET 5 development, but also a angularjs development exercise or a guide to running ASP. NET 5 across platforms.

The original address of the first article is: http://stephenwalther.com/archive/2015/01/12/ Asp-net-5-and-angularjs-part-1-configuring-grunt-uglify-and-angularjs

Developing ANGULARJS applications with ASP. NET 5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.