Search code examples
angularangular6angular7

Can I work multiple angular versions in my computer?


I have installed Angular 7.2.0 globally on my Windows machine. Path is C:\Users\me\AppData\Roaming\npm\node_modules\@angular\cli, and I need to run older projects like Angular 6.0.0. So do I need to install both of versions on my machine in order to run the project?


Solution

  • If you install @angular/cli in each project locally using package.json, then you can use npx ng which will use the local version of the package.

    So for example instead of doing: ng serve

    You would instead do: npx ng serve