Skip to content
Fork of Extended to use ng-bootstrap.
TypeScript JavaScript HTML C# CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This example project tries to retain most of the features of angular-cli while leveraging aspnet-core as an developement server and integrating the webpack build and features like hot-module-replacement into the aspnet-core application.


After checkout you should run dotnet restore and npm install. Visual Studio might do this automatically.


The aspnet core app will automatically build the client app with webpack on startup, which might take up to a few minutes.

Visual Studio

Just choose the profile Self-host or IIS Express and run the application.


dotnet run

aspnet-core SPA features

The aspnet-core features described here are implemented using the Microsoft.AspNetCore.SpaServices package.

Support for push-api URLs

Angular2 can use the push api for routing. This results in URLs that look like instead of (mind the #). When reloading such an URL the server will always serve the index.html of your angular application.

Integration of the webpack build with hot-module-replacement

The aspnet-core app will act as a full-features webpack dev-server. After running the app the console should read [hmr] connected. Try changing you angular components (html, ts, scss..) and hit save. The browser sould display the changes almost instantly.

angular-cli features

The project was first generated with angular cli and then ejected. This project was generated with Angular CLI version 1.0.0.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive/pipe/service/class/module.


Run npm run build to build the project. The build artifacts will be stored in the wwwroot/ directory. Use the -prod flag for a production build.

Running unit tests

Run npm run test to execute the unit tests via Karma.

Running end-to-end tests

Run npm run e2e to execute the end-to-end tests via Protractor. Before running the tests make sure you are serving the app by starting your aspnet-core app. If you are using IIS as a host, make sure to edit the protractor.json to match your port number.

Further help

To get more help on the Angular CLI check out the Angular CLI README.

You can’t perform that action at this time.