Site icon Tutorial

Angular Installation

Go back to Tutorial

The Angular CLI, Angular applications, and Angular itself depend upon features and functionality provided by libraries that are available as npm packages.

You can download and install these npm packages with the npm client, which runs as a node.js application.

The yarn client is a popular alternative for downloading and installing npm packages. The Angular CLI uses yarn by default to install npm packages when you create a new project.

package.json

Both npm and yarn install packages identified in a package.json file. The CLI ng new command creates a default package.json file for your project. This package.json specifies a starter set of packages that work well together and jointly support many common application scenarios. You will add packages to package.json as your application evolves. You may even remove some.

dependencies and devDependencies

The package.json includes two sets of packages, dependencies and devDependencies. The dependencies are essential to running the application. The devDependencies are only necessary to develop the application.

The dependencies section of package.json contains:

Angular Packages

Polyfill packages

Many browsers lack native support for some features in the latest HTML standards, features that Angular requires. “Polyfills” can emulate the missing features. The default package.json installs the core-js package which polyfills missing features for several popular browser.

Support packages

DevDependencies

The packages listed in the devDependencies section of the package.json help you develop the application on your local machine. You don’t deploy them with the production application although there is no harm in doing so.

NPM, Git and Visual Studio Code Installation

To start working with Angular 2, you need to get the following key components installed.

npm Installation

Let’s now look at the steps to get npm installed. The official site for npm is https://www.npmjs.com/

Step 1 − Go to the “get stated with npm” section in the site.

Step 2 − In the next screen, choose the installer to download, depending on the operating system. For the purpose of this exercise, download the Windows 64 bit version.

Step 3 − Launch the installer. In the initial screen, click the Next button.

Step 4 − In the next screen, Accept the license agreement and click the next button.

Step 5 − In the next screen, choose the destination folder for the installation and click the Next button.

Step 6 − Choose the components in the next screen and click the Next button. You can accept all the components for the default installation.

Step 7 − Click the Install button.

Step 8 − Once the installation is complete, click the Finish button.

Step 9 − To confirm the installation, in the command prompt you can issue the command npm version. You will get the version number of npm.

Installation of Visual Studio Code

Following are the features of Visual Studio Code −

The official site for Visual Studio code is https://code.visualstudio.com/ and installation steps are

Step 1 − After the download is complete, please follow the installation steps. In the initial screen, click the Next button.

Step 2 − Accept the license agreement and click the Next button.

Step 3 − Choose the destination location for the installation and click the next button.

Step 4 − Choose the name of the program shortcut and click the Next button.

Step 5 − Accept the default settings and click the Next button.

Step 6 − Click the Install button.

Step 7 − In the final screen, click the Finish button to launch Visual Studio Code.

Installing Git

Some of the key features of Git are −

The official site for Git is https://git-scm.com/ and installation steps are

Step 1 − After the download is complete, please follow the installation steps. In the initial screen, click the Next button.

Step 2 − Choose the components which needs to be installed. You can accept the default components.

Step 3 − In the next step, choose the program shortcut name and click the Next button.

Step 4 − Accept the default SSH executable and click the Next button.

Step 5 − Accept the default setting of “Checkout Windows style, commit Unix style endings” and click the Next button.

Step 6 − Now, accept the default setting of the terminal emulator and click the Next button.

Step 7 − Accept the default settings and click the Next button.

Step 8 − You can skip the experimental options and click the Install button.

Step 9 − In the final screen, click the Finish button to complete the installation.

Go back to Tutorial

Exit mobile version