From 6933fb7924cd1ef01e9259c53bf76023a87d61aa Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Fri, 24 Feb 2012 16:14:44 -0800 Subject: docs(bootstrap): rewritten bootstrap guide --- docs/content/guide/bootstrap.ngdoc | 108 +++++++++++++++++++++ .../guide/dev_guide.bootstrap.auto_bootstrap.ngdoc | 54 ----------- .../dev_guide.bootstrap.manual_bootstrap.ngdoc | 49 ---------- docs/content/guide/dev_guide.bootstrap.ngdoc | 65 ------------- docs/content/guide/index.ngdoc | 5 +- docs/content/guide/overview.ngdoc | 2 +- 6 files changed, 110 insertions(+), 173 deletions(-) create mode 100644 docs/content/guide/bootstrap.ngdoc delete mode 100644 docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc delete mode 100644 docs/content/guide/dev_guide.bootstrap.manual_bootstrap.ngdoc delete mode 100644 docs/content/guide/dev_guide.bootstrap.ngdoc (limited to 'docs/content/guide') diff --git a/docs/content/guide/bootstrap.ngdoc b/docs/content/guide/bootstrap.ngdoc new file mode 100644 index 00000000..bd888b2d --- /dev/null +++ b/docs/content/guide/bootstrap.ngdoc @@ -0,0 +1,108 @@ +@ngdoc overview +@name Developer Guide: Bootstrap +@description + +# Overview + +This page explains the Angular initialization process and how you can manually initialize Angular +if necessary. + + +# Angular ` + + + + + + +# Manual Initialization + + +If you need to have more control over the initialization process, you can use a manual +bootstrapping method instead. Examples of when you'd need to do this include using script loaders +or the need to perform an operation before the Angular compiles a page. + + +Here is an example of manually initializing Angular. The example is equivalent to using the {@link +api/angular.module.ng.$compileProvider.directive.ng:app ng:app} directive. + +
+
+
+  
+    Hello {{'World'}}!
+    
+    
+  
+
+
+ +This sequence that your code should follow: + + 1. After the page and all of the code is loaded, find the root of the HTML template, which is + typically the root of the document. + + 2. Call {@link api/angular.bootstrap} to {@link compiler compile} the template into an + executable, bi-directionally bound application. diff --git a/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc b/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc deleted file mode 100644 index 6fbb528d..00000000 --- a/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc +++ /dev/null @@ -1,54 +0,0 @@ -@ngdoc overview -@name Developer Guide: Initializing Angular: Automatic Initialization -@description - -For Angular to manage the DOM for your application, it needs to compile some or all of an HTML page. Angular does this initialization automatically when you load the angular.js script into your page and insert an `ngApp` directive (attribute) into one of the page's elements. For example, we can tell Angular to initialize the entire document: - -
-
-
-  
-    
-  
-  
-    I can add: {{ 1+2 }}.
-  
-
-
- -You can also tell Angular to manage only a portion of a page. You would want to do this if you are using some other framework to manage other parts of the page. You do this by placing the `ngApp` directive on one or more container elements in the document. For example: - -
-
- I can add: {{ 1+2 }} -
-
- -You can also ask `ngApp` to load additional {@link api/angular.module modules} containing services, directives or filers that you'll use on the page. - -
-
-... -
-
- - - - -... - - - - - - - -... - - - -## Related Topics - -* {@link dev_guide.bootstrap Initializing Angular} -* {@link dev_guide.bootstrap.auto_bootstrap Automatic Initialization} -* {@link dev_guide.compiler Angular HTML compiler} - -## Related API - -{@link api/angular.module.ng.$compile Compiler API} diff --git a/docs/content/guide/dev_guide.bootstrap.ngdoc b/docs/content/guide/dev_guide.bootstrap.ngdoc deleted file mode 100644 index 391475ca..00000000 --- a/docs/content/guide/dev_guide.bootstrap.ngdoc +++ /dev/null @@ -1,65 +0,0 @@ -@ngdoc overview -@name Developer Guide: Initializing Angular -@description - -Initializing Angular consists of loading the `angular.js` script in your page, and specifying how -Angular should process and manage the page. To initialize Angular you do the following: - -* Specify the Angular namespace in the `` page -* Choose which flavor of Angular script to load (debug or production) -* Specify whether or not Angular should process and manage the page automatically (`ngApp`) - -The simplest way to initialize Angular is to load the Angular script and tell Angular to compile -and manage the whole page. You do this as follows: - -
-
-
-  
-    ...
-  
-  
-    ...
-