Giter Club home page Giter Club logo

angular2aspnetcorebaseapp's Introduction

ASP.NET Core with Angular 2 Base App

Base ASP.NET Core project with Angular 2 and TypeScript build-in. You can find more information on my post.

Creating the base structure for this kind of project

In order to easily recreate this structure, you can follow the commits in this repository. Each commit shows a step to configure the base structure for this kind of project.

  1. Create your ASP.NET Core project with MVC: 79174d9
  2. Add Angular 2 dependencies to your package.json: 452a86e
  3. Add Gulp tasks to copy the Angular 2 dependencies to the wwwroot folder: 1d2a6f1
  4. Update layout to include Angular 2 dependencies: d276963. Minor path fix by @mikekidder: 2b92f08
  5. Add TypeScript configuration file: bbd1842
  6. Add es6-shim's TypeScript definitions: fdbd2f3
  7. Add app.component.ts file with the sample AppComponent: 0e9567f
  8. Add boot.ts with the bootstrap of the Angular 2 application: 051a0a2
  9. Update index page with the logic to initialize the Angular 2 application: 514ce93

Adding routing suport to your Angular application

To keep this sample simple and include the feedback and code from @BradRem, I added a new branch named routing-sample with the base structure for Angular 2 routing.

Adding http suport to your Angular application

I added a new branch named http-sample with the base structure for using the HTTP service in Angular 2 to consume an ASP.NET Core API.

Full sample (with routing and http)

You can find the full solution with Angular 2 configured to use HTTP and Route components in an ASP.NET Core application in Visual Studio in the full-sample branch.

angular2aspnetcorebaseapp's People

Contributors

mikekidder avatar nbellocam avatar

Watchers

 avatar  avatar

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.