I have demonstrated how we can do it in a Windows machine. You can follow a similar approach for whichever OS you are using.
You need to follow the steps below and you should have a local installation of Angular versions.
Step 1 : Create a folder in one of your local computer drives. I would like to create an Angular 4 project. For the demonstration, I have created the ‘angular-4-projects’ folder in my D Drive.
Step 2 : Open your cmd (Command prompt) and navigate to “angular-4-projects” that you recently created in the D drive of your machine. In my case, the path would be D:/angular-4-projects
Step 3 : Now install Angular-CLI 1.4.x because that is the version that will install Angular 4 in to your project folder. You need to make sure while installation you are not using -g at the end of the installation command. If you use this -g than Angular- CLI 1.4.x will install globally on your machine. Here is the installing command syntax npm install @angular/cli@
Ex (For angular-4): npm install @email@example.com Ex (For angular-5): npm install @firstname.lastname@example.org Ex (For angular-6): npm install @email@example.com
Note: After angular 6 the Angular-CLI version is the same as the Angular version.
Now, if you want to find which Angular-CLI version to use for which version of Angular you can find that here AngularCLI Package. Once you land on the website you need to navigate to the versions tab and look into the documentation of the specific versions.
For the angular 4 i can use 1.6.x that come before 2 year from Now (Nov-2019)
Step 4 : Now create your angular version project inside that folder using command prompt.
ng new <project-name>
For demonstration, I am creating a project “angulr4demo”
ng new angular4demo
Step 5 : You can check the new project’s version by opening the package.json.
Now that you have seen how you can locally install the Angular-CLI that will allow you to run multiple Angular version in your system simultaneously, go ahead keep creating wonderful projects.· · · ·
Third Rock Techkno is a leading IT services company. We are a top-ranked web, voice and mobile app development company with over 10 years of experience. Client success forms the core of our value system.
We have expertise in the latest technologies including angular, react native, iOs, Android and more. Third Rock Techkno has developed smart, scalable and innovative solutions for clients across a host of industries.
Our team of dedicated developers combine their knowledge and skills to develop and deliver web and mobile apps that boost business and increase output for our clients.