Skip to content

FuningTeng/aspnet-webapi-mvc-angular-seed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asp.Net Wwe Api + MVC + Entity Framework + Angular CLI

This is a seed project utilizing Asp.Net Web API, Entity Framework, ASP.Net MVC together with Angular CLI

Prerequisites

The project have dependencies that require ASP.Net 4.5, Node 6.9.0 or higher, NPM 3 or higher, together with Angular CLI 1.1.2 or higher.

Table of Contents

Installation

BEFORE YOU INSTALL: please read the prerequisites

Reinstall nuget package in Package Manager Console

Update-Package -reinstall

Install node modules in webapp folder

npm install

Usage

Test or develop webapp project

ng serve -o

Build the Angular CLI and create dist folder

ng build -prod

Copy files from dist folder to content folder of web api project

gulp 

Generating Components, Directives, Pipes and Services

You can use the ng generate (or just ng g) command to generate Angular components:

ng generate component my-new-component
ng g component my-new-component # using the alias

# components support relative path generation
# if in the directory src/app/feature/ and you run
ng g component new-cmp
# your component will be generated in src/app/feature/new-cmp
# but if you were to run
ng g component ../newer-cmp
# your component will be generated in src/app/newer-cmp
# if in the directory src/app you can also run
ng g component feature/new-cmp
# and your component will be generated in src/app/feature/new-cmp

You can find all possible blueprints in Angular CLI webstie.

Documentation

The documentation for the Angular CLI is located in this repo's wiki.

License

MIT