Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
|
langages:angular:outils:angular-cli [2019/11/18 11:43] jonathan |
langages:angular:outils:angular-cli [2020/11/18 20:29] (Version actuelle) jonathan |
||
|---|---|---|---|
| Ligne 12: | Ligne 12: | ||
| ===== Générer un projet ===== | ===== Générer un projet ===== | ||
| + | |||
| + | ==== Projet Solo ==== | ||
| + | |||
| [[https:// | [[https:// | ||
| < | < | ||
| ng new project-name --routing=true --skipTests=true --style=scss | ng new project-name --routing=true --skipTests=true --style=scss | ||
| + | </ | ||
| + | |||
| + | ==== Projet Multi ==== | ||
| + | |||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | < | ||
| + | ng new NomDuProjet --createApplication=false --directory=nom-du-projet --interactive=false | ||
| + | cd nom-du-projet | ||
| + | ng generate application app1 --style=scss --routing=true --skipTests=true | ||
| + | ng generate application app2 --style=scss --routing=true --skipTests=true | ||
| + | ng generate lib library1 | ||
| + | ng generate c component1 --project=app2 | ||
| + | |||
| + | // compiler et installer la librairie au sein du projet | ||
| + | ng build library1 | ||
| + | npm install .\dist\library1\ | ||
| </ | </ | ||
| Ligne 34: | Ligne 55: | ||
| [[langages: | [[langages: | ||
| + | |||
| + | ===== Générer un composant ===== | ||
| + | ==== Projet Solo ==== | ||
| + | < | ||
| + | ng g c MonComposant | ||
| + | ng g c sous-dossier/ | ||
| + | </ | ||
| + | ==== Projet Multi ==== | ||
| + | < | ||
| + | ng g c MonComposant --project=app1 | ||
| + | ng g c sous-dossier/ | ||
| + | </ | ||
| + | |||