Cheatography
https://cheatography.com
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 |
Fundamental building block for creating applications in Angular. Units with clear responsibility having following core properties: 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 component'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 application 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 application more adaptable by configuring different providers of the same kind of service, as appropriate in different circumstances. The @Injectable() decorator specifies that Angular can use this class in the DI system. |
Router |
Form |
Unit test |
CLI |
The Angular CLI is a command-line interface tool which allows you to scaffold, develop, test, deploy, and maintain Angular applications directly from a command shell. |
|
Provider |
Pipe |
Pipes are simple functions to use in templates to accept an input value and return a transformed value. Pipes are useful because you can use them throughout your application, 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 |
|