hem19 / NetCoreHeroes

Angular 2 Tour of Heroes on Asp.Net Core in Visual Studio

Home Page:http://netcoreheroes.dangl.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NetCoreHeroes

Build Status

NetCoreHeroes is an example project for the Angular 2 Tour of Heroes tutorial using TypeScript in Visual Studio 2015. It's currently on Angular 2 RC4 and Asp.Net Core 1.0. I've published a few blog posts describing the process from setting up Visual Studio to Continuous Integration with Jenkins.

A live example is available here.

Build and run the project

Visual Studio: Restore node packages for the main NetCoreHeroes project and hit F5 to launch in debug mode.

Command Line: Run npm install, then npm run tsc to restore client side dependencies and compile TypeScript. Then run dotnet restore and dotnet build to compile the Asp.Net Core backend. dotnet run starts the project.

Run unit tests

Asp.Net Core Tests

Just build the whole solution, The NetCoreHeroes.Tests project has the required xUnit dependencies so unit tests are automatically discovered in Visual Studio.

TypeScript Tests

To run the unit tests for Angular 2 components, get the Chutzpah Test Adapter for Visual Studio. The Angular 2 tests should then be available in the Visual Studio Test Explorer after a rebuild.

Visual Studio Test Explorer with Anngular 2 Unit Tests

This example includes tests using async and inject with a MockBackend to unit test the HeroService.

About

Angular 2 Tour of Heroes on Asp.Net Core in Visual Studio

http://netcoreheroes.dangl.me


Languages

Language:TypeScript 41.8%Language:C# 37.0%Language:CSS 9.1%Language:JavaScript 7.9%Language:HTML 4.2%