Show Menu
Cheatography

Angular cheatsheet Cheat Sheet (DRAFT) by

Definitive cheatsheet on Angular frontend framework

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

Major terms

Typescript
Typed superset to ECMAscript
CSS
Component
Fundam­ental building block for creating applic­ations in Angular. Units with clear respon­sib­ility having following core proper­ties: A @Component decorator, An HTML template, A CSS selector, A TypeScript class with behaviors
Decorator
Template
Selector
Events

Components

Composed of
TS class file, Styling file (CSS/SCSS etc), HTML Template file (html or htm), Unit test (spec file with unit tests for the component)
TS class file Syntax
HTML template syntax
 

Major units

NgModule
Component
A compon­ent's job is to enable the user experience and nothing more. A component should present properties and methods for data binding, to mediate between the view (rendered by the template) and the applic­ation logic (which often includes some notion of a model).
Service
Services perform non-UI tasks such as fetching data from the server, validating user input, or logging directly to the console. By defining such processing tasks in an injectable service class, you make those tasks available to any component. You can also make your applic­­ation more adaptable by config­­uring different providers of the same kind of service, as approp­­riate in different circum­sta­nces. The @Injec­­ta­ble() decorator specifies that Angular can use this class in the DI system.
Router
Form
Unit test
CLI
The Angular CLI is a comman­d-line interface tool which allows you to scaffold, develop, test, deploy, and maintain Angular applic­ations directly from a command shell.
Provider
Pipe
Pipes are simple functions to use in templates to accept an input value and return a transf­ormed value. Pipes are useful because you can use them throughout your applic­ation, while only declaring each pipe once. For example, you would use a pipe to show a date as April 15, 1988 rather than the raw string format.

Services

Composed of
TypeScript class, Decorator with details pf provider to make service Injectable or inject other services into it
 

Major tools involved

NPM
Node package manager.
Angular CLI
Webpack