lang:angular:projet
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| lang:angular:projet [2021/10/09 19:06] – Ajout des "Options" de "Compilation" root | lang:angular:projet [2025/10/26 20:22] (Version actuelle) – [Workspace avec une librairie et une application] ajout d'une source pour l'arborescence d'un projet root | ||
|---|---|---|---|
| Ligne 19: | Ligne 19: | ||
| '' | '' | ||
| - | * Erreurs possibles | + | ====Configuration==== |
| - | < | + | Elle se fait avec le fichier '' |
| - | ... | + | |
| - | CREATE angular/src/app/app.component.ts (211 bytes) | + | |
| - | CREATE angular/src/ | + | |
| - | ⠧ Installing packages (npm)...npm ERR! code ERESOLVE | + | |
| - | npm ERR! ERESOLVE unable to resolve dependency tree | + | |
| - | npm ERR! | + | |
| - | npm ERR! While resolving: angular@0.0.0 | + | |
| - | npm ERR! Found: jasmine-core@3.7.1 | + | |
| - | npm ERR! node_modules/ | + | |
| - | npm ERR! dev jasmine-core@" | + | |
| - | npm ERR! | + | |
| - | npm ERR! Could not resolve dependency: | + | |
| - | npm ERR! peer jasmine-core@"> | + | |
| - | npm ERR! node_modules/karma-jasmine-html-reporter | + | |
| - | npm ERR! dev karma-jasmine-html-reporter@" | + | |
| - | npm ERR! | + | |
| - | npm ERR! Fix the upstream dependency conflict, or retry | + | |
| - | npm ERR! this command with --force, or --legacy-peer-deps | + | |
| - | npm ERR! to accept an incorrect (and potentially broken) dependency resolution. | + | |
| - | npm ERR! | + | |
| - | npm ERR! See C: | + | |
| - | npm ERR! A complete log of this run can be found in: | + | * Rubrique |
| - | npm ERR! | + | |
| - | ✖ Package install failed, see above. | + | |
| - | The Schematic workflow failed. See above. | + | |
| - | </ | + | |
| - | + | ||
| - | Cela peut arriver si la version d'Angular est un peu ancienne et que le fichier [[https:// | + | |
| - | + | ||
| - | Supprimer le dossier créé et relancer : | + | |
| - | + | ||
| - | <code bash> | + | |
| - | ng new --skip-install [project] | + | |
| - | </ | + | |
| - | + | ||
| - | Ici, on voit qu'il faut remplacer | + | |
| - | + | ||
| - | et lancer | + | |
| - | + | ||
| - | <code bash> | + | |
| - | npm install | + | |
| - | </ | + | |
| - | [[https://stackoverflow.com/questions/67433893/unable-to-resolve-dependency-tree-error-for-creating-new-angular-project|unable to resolve dependency tree error for creating new angular project]] {{ : | + | Cette rubrique contient les options pour le compilateur tsc. [[https://www.typescriptlang.org/docs/handbook/compiler-options.html|tsc CLI Options]] {{ : |
| - | + | ||
| - | ====Configuration==== | + | |
| - | + | ||
| - | Elle se fait avec le fichier '' | + | |
| Pour utiliser les dernières fonctionnalités javascript, utiliser '' | Pour utiliser les dernières fonctionnalités javascript, utiliser '' | ||
| Ligne 85: | Ligne 40: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | Il est possible d' | ||
| + | |||
| + | <code javascript> | ||
| + | " | ||
| + | </ | ||
| + | |||
| + | Et mettre à jour '' | ||
| + | |||
| + | <code javascript> | ||
| + | " | ||
| + | " | ||
| + | </ | ||
| + | |||
| + | et dans '' | ||
| ====Workspace avec une librairie et une application==== | ====Workspace avec une librairie et une application==== | ||
| Ligne 174: | Ligne 144: | ||
| [[https:// | [[https:// | ||
| + | |||
| + | Et contenu du dossier app: | ||
| + | |||
| + | < | ||
| + | src | ||
| + | └── app | ||
| + | ├── core # services, guards, interceptors, | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | ├── shared | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | └── features | ||
| + | └── feat1 | ||
| + | ├── components | ||
| + | ├── dialogs | ||
| + | ├── directives | ||
| + | ├── pages | ||
| + | ├── pipes | ||
| + | ├── services | ||
| + | ├── store | ||
| + | ├── appointments-routing.ts # Module | ||
| + | └── appointments.ts | ||
| + | </ | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | Convention de nommage des fichiers: | ||
| + | |||
| + | * Component : '' | ||
| + | * Directive : '' | ||
| + | * Service : '' | ||
| + | * Pour les autres : '' | ||
| + | |||
| + | [[https:// | ||
| ====Nouvelle vue==== | ====Nouvelle vue==== | ||
lang/angular/projet.1633799194.txt.gz · Dernière modification : de root
