A Tasks List web app for a Task List REST API service.
This is a simple pet project application that shows how to implement Angular 4 apps with unit tests, e2e tests against a stub backend, configuration for deployment in Heroku, etc.
This project was scaffolded with angular-cli version 1.0.0-beta.20-4.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve
.
https://paucls-task-list-ui.herokuapp.com/
- 1.1.0 - Added code coverage to unit tests.
- 1.0.1 - Updated Angular to version 4.1.2, it fixes bug with MockBackend and the production build. Using again build with AOT.
- 1.0.0 - Updated Angular to version 4.0.0 as part of updating to Angular CLI 1.0.0. (As drawback this versions disables aot on production build, this is related to bug with Angular 4 and MockService angular/angular#15521).
- 0.0.0 - Implemented completely the project, used Angular 2 and Angular CLI 1.0.0-beta.20-4.
Links to some of the articles and documentation used to implement this project:
Deploy to Heroku
- https://paucls.wordpress.com/2016/11/25/deploy-angular-2-cli-app-to-heroku/
- angular/angular-cli#2517
Setup Travis CI
- http://blog.500tech.com/setting-up-travis-ci-to-run-tests-on-latest-google-chrome-version/
- http://mseemann.io/frontend/2016/05/31/setup-angular-2-app-part-1.html
Unit Tests
- https://paucls.wordpress.com/2016/11/30/unit-test-http-services-on-angular-2
- http://gist.asciidoctor.org/?github-mraible%2Fng2-demo%2F%2FREADME.adoc#_testing
- https://angular.io/docs/ts/latest/guide/testing.html#!#component-with-input-output
Stub backend and E2E Tests
Angular 2 Tutorial