Coder Social home page Coder Social logo

elderjames / angular2aspnetcore Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 638 KB

AspNet Core project with Covalent - An Angular2 and Materail Style CRM Template Solution。 Asp.Net Core+Angular2+Material2 最全面的解决方案

TypeScript 43.35% HTML 35.33% CSS 18.87% C# 0.51% JavaScript 1.71% Shell 0.24%
angular2 material-design aspnetcore

angular2aspnetcore's Introduction

Angular2AspNetCore

AspNet Core project with Covalent - An Angular2 and Materail Style CRM Template Solution

将Angular2完整项目与Asp.Net Core项目结合,通过ng-cli编译,在Asp.Net Core运行时直接将路由交由Angular托管

运行环境

  • Node 6.9.5
  • npm 3.10.10
  • .NET Core SDK 1.0.0
  • .NET Core 1.1.0
  • Visual Studio 2017 或Visual Studio Code

使用方法

  1. git clone https://github.com/ElderJames/Angular2AspNetCore.git
  2. cd Angular2AspNetCore
  3. npm install
  4. npm start
  5. dotnet restore
  6. 'dotnet run'
  7. 浏览器访问http://localhost:5000

原理

在Startup.cs文件中自定义了一个重定向中间件,将所以请求都定向到作为Angular主入口的index.html文件。如后面需加入Api和其他页面,只需要判断请求路径即可与MVC路由结合。

下一步

  1. 利用Covalent模板设计CRM管理后台模板。
  2. 编写MVC项目,加入权限管理。
  3. 结合JavascriptService的服务端预渲染功能(之前尝试很久但是失败了,所以才出此下策先全部用angular-cli编译成全部前端渲染……)
  4. 更多尝试

angular2aspnetcore's People

Contributors

elderjames avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

iamravikumar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.