Environment Setup – AngularJS

For create an AngularJS application, you need to include AngularJS javascript file into your application.

First download the latest AngularJS javascript file.

There are two ways you can include the AngularJS javascript file in your application.

  1. Download AngularJS javascript file directly from AngularJS site
  2. Include AngularJS javascript file from Google CDN

Download from the AngularJS site

Go to https://angularjs.org/ site and click on the Download button.

AngularJS_Download_Button

After click you got a popup asking for select version to download.

AngularJS_Download_Popup

You have two options for Branch:

  1. 1.2.x (legacy)
  2. 1.3.x (latest)

Choose latest version 1.3.x. Next option is Build. In this you have three options:

  1. Minified – It’s removed all unnecessary characters and spaces from the source code.
  2. Uncompressed – It’s has all the source code plus the comments.
  3. Zip – It’s the compressed version of script file.

Choose Minified and click on the download button. This will download one angular.min.js file.


Google CDN

On the dowload pop, there is a textbox showing CDN URL.

Google_CDN_AngularJS

Copy the file path and include in your HTML file like below:

<!DOCTYPE html>
<html>
	<head>
		<title>First AngularJS App</title>
	</head>
<body>
	<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js"></script>
</body>
</html>