Show Menu
Cheatography

Angular 2 CLI Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Open Points

- Menu toolba­r,s­idenav, rgba (Materials 2)
- List of objects (Card)
- Form incl. add button
- Validator (required, pwd rules, pwd matches)
- Intera­ction with REST service

Initialize

npm install -g angular-cli
ng new my-dream-app --skip-git
cd my-dream-app
ng serve

ng generate

ng generate component hello
ng generate route about
ng build
ng get
ng set
ng format
ng doc
ng version

// run karma
ng test
// run protractor
ng e2e
// run codelyzer
ng lint
 

Folder Structure

config/
config­uration files
e2e/
end to end tests
node_m­odules/
npm depend­encies
public/
compil­ation target - web server main
src/app/
main applic­ation source
typings/
packag­e.json
depend­encies

Style Guide

src/ap­p/name
Component w
src/ap­p/+name
lazy loaded like routing compon­ents, its child comps and their related assets and modules
   

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi