mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
feat(module): new module loader
This commit is contained in:
@@ -20,10 +20,10 @@ example points to (non-minified) version 0.9.12:
|
||||
|
||||
<pre>
|
||||
<!doctype html>
|
||||
<html xmlns:ng="http://angularjs.org">
|
||||
<html xmlns:ng="http://angularjs.org" ng:app>
|
||||
<head>
|
||||
<title>My Angular App</title>
|
||||
<script src="http://code.angularjs.org/angular-0.9.12.js" ng:autobind></script>
|
||||
<script src="http://code.angularjs.org/angular-0.9.12.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
|
||||
@@ -27,18 +27,17 @@ Now let's take a closer look at that code, and see what is going on behind
|
||||
the scenes.
|
||||
|
||||
The first line of interest defines the `ng` namespace, which makes
|
||||
AngularJS work across all browsers (especially important for IE):
|
||||
AngularJS work across all browsers (especially important for IE). The
|
||||
`ng:app` tags tells angular to process the entire HTML when it is loaded:
|
||||
|
||||
<pre>
|
||||
<html xmlns:ng="http://angularjs.org">
|
||||
<html xmlns:ng="http://angularjs.org" ng:app>
|
||||
</pre>
|
||||
|
||||
The next line downloads the angular script, and instructs angular to process
|
||||
the entire HTML page when it is loaded:
|
||||
The next line downloads the angular script:
|
||||
|
||||
<pre>
|
||||
<script type="text/javascript" src="http://code.angularjs.org/angular-?.?.?.min.js"
|
||||
ng:autobind></script>
|
||||
<script type="text/javascript" src="http://code.angularjs.org/angular-?.?.?.min.js"></script>
|
||||
</pre>
|
||||
|
||||
(For details on what happens when angular processes an HTML page,
|
||||
|
||||
Reference in New Issue
Block a user