π
°οΈ
Angular CLI
Table of contents
ng CLI μ 리 (a.k.a cheat sheet)
ng new (μλ‘μ΄ μλ‘μ΄ νλ‘μ νΈ μμ±)
sh
$ ng new <name> [option]
sh
$ ng n <name> [options]
ng newμ μ΅μ
-s ( --inlineStyle=true|false )
μΈλΌμΈ μ€νμΌλ‘ μμ±
(When true, includes styles inline in the component TS file.)
-t ( --inlineTemplate=true|false )
μΈλΌμΈ ν νλ¦ΏμΌλ‘ μμ±
(When true, includes template inline in the component TS file.)
-S ( --skipTests=true|false )
λλ¬Έμ S, ν μ€νΈ νμΌμ μμ±νμ§ μλλ€.
(When true, does not generate "spec.ts" test files for the new project.)
-g ( --skipGit=true|false )
git μ΄λμ λΌμ΄μ§μ νμ§ μμ
(When true, does not initialize a git repository.)
μ)
sh
$ ng n new-project -s -t -S
new-projectλΌλ μΈλΌμΈ μ€νμΌ, μΈλΌμΈ ν νλ¦Ώ, ν μ€νΈ νμΌ μμ΄ μλ‘μ΄ νλ‘μ νΈλ₯Ό μμ±νλ€.
ng generate
sh
$ ng generate <schematic> [options]
sh
$ ng g <schematic> [options]
κ³΅ν΅ μ΅μ
--flat ν΄λ μμ΄ μμ±
μ»΄ν¬λνΈ μμ±
sh
$ ng generate component <name> [otions]
sh
$ ng g c <name> [options]
λλ ν°λΈ μμ±
sh
$ ng generate directive <name> [options]
sh
$ ng g d <name> [optins]
μΈν°νμ΄μ€ μμ±
sh
$ ng generate interface <name> <type> [options]
sh
$ ng g i <name> <type> [options]
νμ΄ν μμ±
sh
$ ng generate pipe <name> [options]
sh
$ ng g p <name> [options]
μλΉμ€ μμ±
sh
$ ng generate service <name> [options]
sh
$ ng g s <name> [options]
ν΄λμ€ μμ±
sh
$ ng generate class <name> [options]
sh
$ ng g cl <name> [options]
κ°λ μμ±
sh
$ ng generate guard <name> [options]
sh
$ ng g g <name> [options]
reference
μμΈν μ€λͺ μ 곡μλ¬Έμ μ°Έκ³ ! https://angular.io/cli