This is a basic application that you can use to bootstrap your new Angular 2 project.
To get started, change all occurrences of "app"
in this project to your app name.
- Latest version of Angular:
4.1.2 (2017-05-10)
- Webpack 2
- Linting (TSLint & Codelyzer)
- Unit Testing (Karma & Jasmine)
- E2E Testing (Protractor)
- Docker
- Routing
/home
: Not lazy-loaded/about
: Lazy-loaded
- HTTP Request via Service (
GET
public IP address) - Dev build (via Webpack Dev Server), and Prod build (via AOT)
- Angular Material 2
git clone https://github.com/camargo/ng-seed.git
cd ng-seed
npm cache clean
npm install
rm -rf node_modules
rm -rf dist
npm run build:dev
Visit http://localhost:8080/ to view the running application.
Build image and run container from that image:
npm run build:prod
docker build -t app-image $(pwd)/dist
docker run --name app -d -p 8081:80 app-image
Or just run container:
npm run build:prod
docker run --name app -v $(pwd)/dist:/usr/share/nginx/html:ro -d -p 8081:80 nginx
Visit http://localhost:8081/ to view the running application.
npm run lint
npm run unit
npm run e2e