Angular CLI
Thease are command,which is use for multiple purposes from angular installation to till production release.
npm install -g @angular/cli@
npm uninstall -g @angular/cli@
@
npm cache clean — Clear the cache
npm cache verify — verify the npm cache is clear.
ng -v – angular CLI version
ng new
ng g m
ng g m
ng g c
— Flat true/false – Seperated folder or not.
–inline-template ( -it ) — Separated HTML template will not create.
–inline-style ( -is ) — Separated CSS or SCSS file will not create.
–spec ByDefault true can be fix false — will not create Unit test spec file.
–view-encapsulation( -ve ) – View Encapsulation Strategy
–change-detection ( -cd ) – can be set OnPush Strategy
–dry-run ( -d )
ng g s
ng g g
ng g cl
ng g d
ng g p
ng g i
ng g e
ng serve — RUN Angular app default 4200 port
ng serve -o — will open the browser by default.
ng serve –port 8080 – Angular Application will run on the 8080 port
ng serve –live-reload – Reload when change occur
ng servev –ssl Using HTTPS
–proxy-config — pc —
ng serve -aot – Angular RUN same as in the production mode to avoid the surprise on the ng build
ng build –prod — Angular run on production build mode.
ng build -sm ( –sourcemap )
ng build –aot
ng build –watch
ng build –environment
ng build –target
ng build –dev
ng build –base-href (–bh)/
ng set defaults.styleExt scss – Angular CLI default stylesheet format is CSS. Can be change to SCSS file.
ng test –single-run
ng test –progress
ng test –colors
ng e2e –s ( Serve ) –ee ( element-explorer ) –c ( Config ) –sp ( specs ) –wu ( webdriver-update )