You are on page 1of 2

Angular Cheat Sheet

by KNiGHT BLOOD (spegusess) via cheatography.com/108914/cs/21506/

Instal​lation Angular src/ Structure

pre-re​qui​‐ NodeJS, npm, Angula​rCLI, app/ applic​ation folder that stores


rement IDE components of the applic​ation.
update ng update @angul​ar/cli assets/ images, js files
@angul​ar/core enviro​‐ details of whether the final file
version node -v && npm -v && ng nment/ should be compiled in the
check version production enviro​nment or the
dev enviro​nment.
Project Setup index.html file which is displayed in the
creating app ng new my-app browser.

app folder cd my-app main.ts importing the basic modules


and setup.
run app ng serve
polyfi​lls.ts used for backward compat​ibi​‐
run app ng serve --host 0.0.0.0 –port
lity.
custom 4205
test.ts unit test cases for testing the
app/ Structure
project will be handled.
app.mo​ explain the usage of the libraries.
styles.css style file required for the
dule.ts They are imported and saved into
project.
variables such as declar​ations,
favico​‐ site icon file
imports, providers, and bootstrap.
n.ico
app.co​‐ html code for the app is in this
tsconf​‐ config details that need to be
mpo​‐ file.
ig.a​‐ used to run the applic​ation.
nen​‐
pp.json
t.html
tsconf​ig.s​‐ helps maintain the details for
app.co​‐ contain unit tests for source
pe​c.json testing.
mpo​‐ component.
nen​t.s​‐ typing​‐ manage the Typescript defini​‐
pec.ts s.d.ts tion.

app.co​‐ class for the component is


mpo​‐ defined. do the processing of the
nent.ts html structure in the .ts file.

app-ro​‐ deal with the routing. connected


uti​‐ with the main module, app.mo​‐
ng.m​‐ dul​e.ts.
od​‐
ule.ts

By KNiGHT BLOOD Published 4th January, 2020. Sponsored by ApolloPad.com


(spegusess) Last updated 4th January, 2020. Everyone has a novel in them. Finish
cheatography.com/spegusess/ Page 1 of 2. Yours!
blackvisionlab.com https://apollopad.com
Angular Cheat Sheet
by KNiGHT BLOOD (spegusess) via cheatography.com/108914/cs/21506/

Folder Structure

e2e/ end to end test folder. Mainly e2e is used for integr​‐
ation testing and helps ensure the applic​ation works
fine.
node_m​‐ the npm package installed node_m​odules. Stores
odules/ packages available.
src/ folder where work on the projec​t.app/ folder created
during the project setup and holds all the required files
required for the project.
angula​‐ holds the project name, version of cli, etc.
r.json
.edito​‐ config file for the editor
rconfig
.gitignore file should be committed into the reposi​tory, in order to
share the ignore rules with any other users that clone
the reposi​tory.
packag​‐ file tells which libraries will be installed into node_m​‐
e.json odules when you run npm install.
tsconf​‐ contains the compiler options required during compil​‐
ig.json ation.
tslint.json config file with rules to be considered while compiling.

By KNiGHT BLOOD Published 4th January, 2020. Sponsored by ApolloPad.com


(spegusess) Last updated 4th January, 2020. Everyone has a novel in them. Finish
cheatography.com/spegusess/ Page 2 of 2. Yours!
blackvisionlab.com https://apollopad.com

You might also like