- Angular 6 for Enterprise:Ready Web Applications
- Doguhan Uluca
- 189字
- 2021-06-25 21:20:30
Installing Angular CLI
The documentation at https://angular.io/guide/quickstart will guide you to install @angular/cli as a global npm package. Do not do this. Overtime, as Angular CLI is upgraded, it is a constant irritant to have to keep the global and the in-project version in sync. If you don't, the tool complains endlessly. Additionally, if you are working on multiple projects, you will have varying versions of Angular CLI overtime. As a result, your commands may not return the results you expect or your team members get.
The strategy detailed in the next section will make your initial configuration of your Angular project a bit more complicated than it needs to be; however, you'll be more than making up for this pain if you return to a project a few months or a year later. In that case, you will be able to use the version of the tool that you last used on that project, instead of some future version that may require upgrades that you're not willing to perform. In the next section, you will apply this best practice to initialize your Angular app.