mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-28 07:23:59 +00:00
docs: recommend using Google CDN
This commit is contained in:
parent
9e991ddb1d
commit
8b44324814
1 changed files with 10 additions and 7 deletions
|
|
@ -2,10 +2,9 @@
|
||||||
@name Downloading
|
@name Downloading
|
||||||
@description
|
@description
|
||||||
|
|
||||||
# Including angular scripts from the angular server
|
# Including angular scripts from the Google CDN
|
||||||
The quickest way to get started is to point your html `<script>` tag to a
|
The quickest way to get started is to point your html `<script>` tag to a Google CDN URL.
|
||||||
<http://code.angularjs.org/> URL. This way, you don't have to download anything or maintain a
|
This way, you don't have to download anything or maintain a local copy.
|
||||||
local copy.
|
|
||||||
|
|
||||||
There are two types of angular script URLs you can point to, one for development and one for
|
There are two types of angular script URLs you can point to, one for development and one for
|
||||||
production:
|
production:
|
||||||
|
|
@ -15,21 +14,25 @@ development.
|
||||||
* __angular-<version>.min.js__ — This is the minified version, which we strongly suggest you use in
|
* __angular-<version>.min.js__ — This is the minified version, which we strongly suggest you use in
|
||||||
production.
|
production.
|
||||||
|
|
||||||
To point your code to an angular script on the angular server, use the following template. This
|
To point your code to an angular script on the Google CDN server, use the following template. This
|
||||||
example points to (non-minified) version 1.0.2:
|
example points to the minified version 1.0.2:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html ng-app>
|
<html ng-app>
|
||||||
<head>
|
<head>
|
||||||
<title>My Angular App</title>
|
<title>My Angular App</title>
|
||||||
<script src="http://code.angularjs.org/1.0.2/angular.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
Note that only versions 1.0.1 and above are available on the CDN, if you need an earlier version
|
||||||
|
you can use the <http://code.angularjs.org/> URL which was the previous recommended location for
|
||||||
|
hosted code source. If you're still using the angular server you should switch to the CDN version
|
||||||
|
for even faster loading times.
|
||||||
|
|
||||||
# Downloading and hosting angular files locally
|
# Downloading and hosting angular files locally
|
||||||
This option is for those who want to work with angular offline, or those who want to host the
|
This option is for those who want to work with angular offline, or those who want to host the
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue