Skip to content

stanleychen/ASPNET-Core-Angular2-Webpack-StarterTemplate

Repository files navigation

Angular 2 // Webpack // ASP.NET CORE WebAPI Starter Template

This is a starter template for developing Angular2 with ASP.NET Core WebAPI Applications using webpack for bundling. It has the webpack dev server included as well as css styles in webpack, hashes for your files, automatic injection into the index.html etc.

This template is an Angular2 application with an http-service getting values from an ASP.NET CORE WebAPI.

Blogpost

How to set up Angular 2 and Webpack in Visual Studio with ASP.NET Core

Start

alt text

Start by typing

npm start

at the level of the "package.json" file and browse to

localhost:5000

Option 2 (Frontend and backend running)

Now you can just press "play" inside Visual Studio to get started.

If you change the *.ts-files you need to run the tsc command manually.

Option 3 (Only frontend is running)

npm run startWebpackDevServer will run the webpack dev server. After this you can browse to

localhost:8080

and see the page working. You can do changes to the application and they will be automatically reflected in the browser.

alt text

Option 4 (frontend and backend running)

You can type npm run build and browse to localhost:5000 to see the page. This will trigger an webpack build and an dotnet run. Changes will not automatically appear in the browser.

alt text

About

A Starter Template for beginning with ASP.NET Core WebAPI, Angular 2 and Webpack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages