Purely for educational purposes but mostly for the entertainment value.
Simple Angular 2 demo project, based on the QuickStart project and used for my "Angular 102" session at XLR8 Conference 2016. I've made the commits in steps so you can track each one and added some comments.
Demo @Component
renders a fairly short list of main characters allowing to swap to
alternative/popular names (sometimes the only ones I can remember) and of course you can
off a character using a truly killer @Directive
functionality :)
Below is an excerpt from the original README for quick setup reference:
Install the npm packages described in the package.json
and verify that it works:
Attention Windows Developers: You must run all of these commands in administrator mode
npm install
npm start
The npm start
command first compiles the application,
then simultaneously re-compiles and runs the lite-server
.
Both the compiler and the server watch for file changes.
Shut it down manually with Ctrl-C.
You're ready to write your application.
We've captured many of the most useful commands in npm scripts defined in the package.json
:
npm start
- runs the compiler and a server at the same time, both in "watch mode".npm run tsc
- runs the TypeScript compiler once.npm run tsc:w
- runs the TypeScript compiler in watch mode; the process keeps running, awaiting changes to TypeScript files and re-compiling when it sees them.npm run lite
- runs the lite-server, a light-weight, static file server, written and maintained by John Papa and Christopher Martin with excellent support for Angular apps that use routing.npm run typings
- runs the typings tool.npm run postinstall
- called by npm automatically after it successfully completes package installation. This script installs the TypeScript definition files this app requires.
Here are the test related scripts:
npm test
- compiles, runs and watches the karma unit testsnpm run webdriver:update
- ONE TIME update for protractor end-to-end (e2e) testsnpm run e2e
- run protractor e2e tests, written in JavaScript (*e2e-spec.js)