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.
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.
Just build the whole solution, The NetCoreHeroes.Tests
project has the required xUnit dependencies so unit tests are automatically
discovered in Visual Studio.
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.
This example includes tests using async
and inject
with a MockBackend
to unit test the HeroService
.