The quickest way to get started is to point your html <script>
tag to a Google CDN URL.
This way, you don't have to download anything or maintain a local copy.
There are two types of AngularJS script URLs you can point to, one for development and one for production:
To point your code to an AngularJS script on the Google CDN server, use the following template. This example points to the minified version 1.5.6:
<!doctype html>
<html ng-app>
<head>
<title>My AngularJS App</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
</head>
<body>
</body>
</html>
This option is for those who want to work with AngularJS offline, or those who want to host the AngularJS files on their own servers.
If you navigate to https://code.angularjs.org/, you'll see a directory listing with all of the AngularJS versions since we started releasing versioned build artifacts. Each directory contains all artifacts that we released for a particular version. Download the version you want and have fun.
2.
(e.g. 2.0.0-beta.17
) — they are not related to
AngularJS. They contain build artifacts from Angular versions.
Each directory under https://code.angularjs.org/ includes a set of files that comprise the
corresponding version. All JavaScript files (except for angular-mocks
which is only used during
development) come in two flavors — one suitable for development, the other for production:
<filename>.js
— These files are non-obfuscated, non-minified, and human-readable by opening
them in any editor or browser. In order to get better error messages during development, you
should always use these non-minified scripts.
<filename>.min.js
— These are minified and obfuscated versions, created with the
Closure compiler. Use these versions for
production in order to minimize the size of the application that is downloaded by your user's
browser.
<filename>.min.js.map
— These are
sourcemap files. You can
serve them alongside the .min.js
files in order to be able to debug the minified code (e.g. on a
production deployment) more easily, but without impacting performance.
The set of files included in each version directory are:
angular.zip
— This is a zip archive that contains all of the files released for this AngularJS
version. Use this file to get everything in a single download.
angular.js
— The core AngularJS framework. This is all you need to get your AngularJS app
running.
angular-csp.css
— You only need this file if you are using
CSP (Content Security Policy). See
here for more info.
angular-mocks.js
— This file contains an implementation of mocks that makes testing angular
apps even easier. Your unit/integration test harness should load this file after angular.js
is
loaded.
angular-loader.js
— Module loader for AngularJS modules. If you are loading multiple
script files containing AngularJS modules, you can load them asynchronously and in any order as long
as you load this file first. Often the contents of this file are copy&pasted into the index.html
to avoid even the initial request to angular-loader[.min].js
.
See angular-seed for
an example of usage.
Additional AngularJS modules: Optional modules with additional functionality. These files
should be loaded after the core angular[.min].js
file:
angular-animate.js
— Enable animation support. (API docs)angular-aria.js
— Make your apps accessible to users of
assistive technologies. (API docs)angular-cookies.js
— A convenient wrapper for reading and writing browser cookies.
(API docs)angular-message-format.js
— Enhanced support for pluralization and gender specific
messages in interpolated text. (API docs)angular-messages.js
— Enhanced support for displaying validation messages.
(API docs)angular-parse-ext.js
— Allow Unicode characters in identifiers inside AngularJS expressions.
(API docs)angular-resource.js
— Easy interaction with RESTful services.
(API docs)angular-route.js
— Routing and deep-linking services and directives for AngularJS apps.
(API docs)angular-sanitize.js
— Functionality to sanitize HTML. (API docs)angular-touch.js
— Touch events for touch-enabled devices.
(API docs)docs/
— This directory contains all the files that compose the https://docs.angularjs.org/
documentation app. These files are handy to see the older versions of our docs, or even more
importantly, view the docs offline.
i18n/
- This directory contains locale specific
ngLocale
AngularJS modules to override the defaults defined in the main ng
module.