diff --git a/docs/angular.attrMarkup.ngdoc b/docs/content/api/angular.attrMarkup.ngdoc similarity index 100% rename from docs/angular.attrMarkup.ngdoc rename to docs/content/api/angular.attrMarkup.ngdoc diff --git a/docs/angular.directive.ngdoc b/docs/content/api/angular.directive.ngdoc similarity index 100% rename from docs/angular.directive.ngdoc rename to docs/content/api/angular.directive.ngdoc diff --git a/docs/angular.element.ngdoc b/docs/content/api/angular.element.ngdoc similarity index 100% rename from docs/angular.element.ngdoc rename to docs/content/api/angular.element.ngdoc diff --git a/docs/angular.filter.ngdoc b/docs/content/api/angular.filter.ngdoc similarity index 100% rename from docs/angular.filter.ngdoc rename to docs/content/api/angular.filter.ngdoc diff --git a/docs/angular.formatter.ngdoc b/docs/content/api/angular.formatter.ngdoc similarity index 100% rename from docs/angular.formatter.ngdoc rename to docs/content/api/angular.formatter.ngdoc diff --git a/docs/angular.markup.ngdoc b/docs/content/api/angular.markup.ngdoc similarity index 100% rename from docs/angular.markup.ngdoc rename to docs/content/api/angular.markup.ngdoc diff --git a/docs/angular.ngdoc b/docs/content/api/angular.ngdoc similarity index 100% rename from docs/angular.ngdoc rename to docs/content/api/angular.ngdoc diff --git a/docs/angular.service.ngdoc b/docs/content/api/angular.service.ngdoc similarity index 100% rename from docs/angular.service.ngdoc rename to docs/content/api/angular.service.ngdoc diff --git a/docs/angular.validator.ngdoc b/docs/content/api/angular.validator.ngdoc similarity index 100% rename from docs/angular.validator.ngdoc rename to docs/content/api/angular.validator.ngdoc diff --git a/docs/angular.widget.ngdoc b/docs/content/api/angular.widget.ngdoc similarity index 100% rename from docs/angular.widget.ngdoc rename to docs/content/api/angular.widget.ngdoc diff --git a/docs/cookbook.buzz.ngdoc b/docs/content/cookbook/buzz.ngdoc similarity index 100% rename from docs/cookbook.buzz.ngdoc rename to docs/content/cookbook/buzz.ngdoc diff --git a/docs/cookbook.deeplinking.ngdoc b/docs/content/cookbook/deeplinking.ngdoc similarity index 100% rename from docs/cookbook.deeplinking.ngdoc rename to docs/content/cookbook/deeplinking.ngdoc diff --git a/docs/cookbook.form.ngdoc b/docs/content/cookbook/form.ngdoc similarity index 100% rename from docs/cookbook.form.ngdoc rename to docs/content/cookbook/form.ngdoc diff --git a/docs/cookbook.formadvanced.ngdoc b/docs/content/cookbook/formadvanced.ngdoc similarity index 100% rename from docs/cookbook.formadvanced.ngdoc rename to docs/content/cookbook/formadvanced.ngdoc diff --git a/docs/cookbook.helloworld.ngdoc b/docs/content/cookbook/helloworld.ngdoc similarity index 100% rename from docs/cookbook.helloworld.ngdoc rename to docs/content/cookbook/helloworld.ngdoc diff --git a/docs/cookbook.ngdoc b/docs/content/cookbook/index.ngdoc similarity index 100% rename from docs/cookbook.ngdoc rename to docs/content/cookbook/index.ngdoc diff --git a/docs/cookbook.mvc.ngdoc b/docs/content/cookbook/mvc.ngdoc similarity index 100% rename from docs/cookbook.mvc.ngdoc rename to docs/content/cookbook/mvc.ngdoc diff --git a/docs/guide.bootstrap.ngdoc b/docs/content/guide/bootstrap.ngdoc similarity index 100% rename from docs/guide.bootstrap.ngdoc rename to docs/content/guide/bootstrap.ngdoc diff --git a/docs/guide.data-binding.ngdoc b/docs/content/guide/data-binding.ngdoc similarity index 100% rename from docs/guide.data-binding.ngdoc rename to docs/content/guide/data-binding.ngdoc diff --git a/docs/guide.expression.ngdoc b/docs/content/guide/expression.ngdoc similarity index 100% rename from docs/guide.expression.ngdoc rename to docs/content/guide/expression.ngdoc diff --git a/docs/guide.compiler.ngdoc b/docs/content/guide/guide.compiler.ngdoc similarity index 100% rename from docs/guide.compiler.ngdoc rename to docs/content/guide/guide.compiler.ngdoc diff --git a/docs/guide.css.ngdoc b/docs/content/guide/guide.css.ngdoc similarity index 100% rename from docs/guide.css.ngdoc rename to docs/content/guide/guide.css.ngdoc diff --git a/docs/guide.di.ngdoc b/docs/content/guide/guide.di.ngdoc similarity index 100% rename from docs/guide.di.ngdoc rename to docs/content/guide/guide.di.ngdoc diff --git a/docs/guide.ngdoc b/docs/content/guide/index.ngdoc similarity index 100% rename from docs/guide.ngdoc rename to docs/content/guide/index.ngdoc diff --git a/docs/guide.overview.ngdoc b/docs/content/guide/overview.ngdoc similarity index 100% rename from docs/guide.overview.ngdoc rename to docs/content/guide/overview.ngdoc diff --git a/docs/guide.template.ngdoc b/docs/content/guide/template.ngdoc similarity index 100% rename from docs/guide.template.ngdoc rename to docs/content/guide/template.ngdoc diff --git a/docs/guide.testing.ngdoc b/docs/content/guide/testing.ngdoc similarity index 100% rename from docs/guide.testing.ngdoc rename to docs/content/guide/testing.ngdoc diff --git a/docs/contribute.ngdoc b/docs/content/intro/contribute.ngdoc similarity index 100% rename from docs/contribute.ngdoc rename to docs/content/intro/contribute.ngdoc diff --git a/docs/downloading.ngdoc b/docs/content/intro/downloading.ngdoc similarity index 100% rename from docs/downloading.ngdoc rename to docs/content/intro/downloading.ngdoc diff --git a/docs/faq.ngdoc b/docs/content/intro/faq.ngdoc similarity index 100% rename from docs/faq.ngdoc rename to docs/content/intro/faq.ngdoc diff --git a/docs/started.ngdoc b/docs/content/intro/started.ngdoc similarity index 100% rename from docs/started.ngdoc rename to docs/content/intro/started.ngdoc diff --git a/docs/testimonials.ngdoc b/docs/content/intro/testimonials.ngdoc similarity index 100% rename from docs/testimonials.ngdoc rename to docs/content/intro/testimonials.ngdoc diff --git a/docs/tutorial.ngdoc b/docs/content/tutorial/index.ngdoc similarity index 100% rename from docs/tutorial.ngdoc rename to docs/content/tutorial/index.ngdoc diff --git a/docs/tutorial.step_00.ngdoc b/docs/content/tutorial/step_00.ngdoc similarity index 96% rename from docs/tutorial.step_00.ngdoc rename to docs/content/tutorial/step_00.ngdoc index dbe38285..e506fcaf 100755 --- a/docs/tutorial.step_00.ngdoc +++ b/docs/content/tutorial/step_00.ngdoc @@ -1,4 +1,3 @@ - @workInProgress @ngdoc overview @name Tutorial: Step 0 @@ -16,7 +15,7 @@ The following sample code is our starting point. It is a static HTML page that displays next to nothing, but it has everything we need to proceed. You can think of this bit of code as our -prototype template, consisting of basic HTML tags with a pair of angular specific attributes. +prototype template, consisting of basic HTML tags with a pair of angular specific attributes. __`app/index.html`:__
diff --git a/docs/tutorial.step_01.ngdoc b/docs/content/tutorial/step_01.ngdoc
similarity index 81%
rename from docs/tutorial.step_01.ngdoc
rename to docs/content/tutorial/step_01.ngdoc
index d96eaeb3..e22adc20 100755
--- a/docs/tutorial.step_01.ngdoc
+++ b/docs/content/tutorial/step_01.ngdoc
@@ -1,20 +1,20 @@
-@workInProgress
+@workInProgress
 @ngdoc overview
 @name Tutorial: Step 1
 @description
 
-    
+   
-    
+    
{@link tutorial Previous}{@link tutorial.step_00 Previous} {@link http://angular.github.com/angular-phonecat/step-1/app Example} {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-0...step-1 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_02 Next}
Now that we have the basic ingredients in place, let's add some basic information about two cell -phones to our app. +phones to our app. Note: We will usually include only the new code that we added for each step. In this and subsequent examples, we will leave out code from the previous step that hasn't changed, for @@ -23,7 +23,7 @@ example: ... ... - + Let's add the following code to `index.html`: __`app/index.html`:__ @@ -53,18 +53,18 @@ __`app/index.html`:__ ## Discussion: -* It's a static web page! We displayed info about two phones! Yay. +* It's a static web page! We displayed info about two phones! Yay. * For those of you playing along at home on your own web servers, did you switch to Step 1 and -refresh your browsers? +refresh your browsers? - * __{@link tutorial Using Git:}__ + * __{@link tutorial Using Git:}__ From your `angular-phonecat` directory, run this command: git checkout step-1 - * __{@link tutorial Using Snapshots:}__ + * __{@link tutorial Using Snapshots:}__ From `[install directory]/sandbox`, run this command: @@ -78,11 +78,11 @@ into a dynamic web app. - + - +
{@link tutorial Previous}{@link tutorial.step_00 Previous} {@link http://angular.github.com/angular-phonecat/step-1/app Example} {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-0...step-1 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_02 Next}
diff --git a/docs/tutorial.step_02.ngdoc b/docs/content/tutorial/step_02.ngdoc similarity index 90% rename from docs/tutorial.step_02.ngdoc rename to docs/content/tutorial/step_02.ngdoc index 62becdba..50fbd240 100755 --- a/docs/tutorial.step_02.ngdoc +++ b/docs/content/tutorial/step_02.ngdoc @@ -1,15 +1,15 @@ -@workInProgress +@workInProgress @ngdoc overview @name Tutorial: Step 2 @description - + - +
{@link tutorial.step_00 Previous}{@link tutorial.step_01 Previous} {@link http://angular.github.com/angular-phonecat/step-2/app Example} {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-1...step-2 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_03 Next}
@@ -41,7 +41,7 @@ __`app/index.html`:__
Our data __Model__ (a short list of phones in object literal notation) is instantiated within our -__Controller__ function (`PhoneListCtrl`): +__Controller__ function (`PhoneListCtrl`): __`app/js/controllers.js`:__
@@ -84,7 +84,7 @@ enclosed in curly braces: `{{phone.name}}` and `{{phone.snippet}}`:
 
     * The `ng:repeat="phone in phones"` statement in the `
  • ` tag is an angular repeater. It tells angular to create a `
  • ` element for each phone in the phones list, using the first - `
  • ` tag as the template. + `
  • ` tag as the template. * The curly braces around `phone.name` and `phone.snippet` are an example of {@link angular.markup angular markup}. The curly braces are shorthand for the angular directive @@ -97,11 +97,11 @@ enclosed in curly braces: `{{phone.name}}` and `{{phone.snippet}}`: * __Controller:__ At this point, it doesn't appear as if our controller is doing very much controlling, but it is playing a crucial role: providing context for our data model so we can establish data-binding between the model and the view. Note in the following how we connected the -dots between our presentation, data, and logic components: +dots between our presentation, data, and logic components: * The name of our controller function (in the JavaScript file `controllers.js`) matches the {@link angular.directive.ng:controller ng:controller} directive in the `` tag - (`PhoneListCtrl`). + (`PhoneListCtrl`). * We instantiated our data within the scope of our controller function, and our template binding points are located within the block bounded by the ` - {@link tutorial.step_00 Previous} + {@link tutorial.step_01 Previous} {@link http://angular.github.com/angular-phonecat/step-2/app Example} {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-1...step-2 Code Diff} - {@link tutorial.step_00 Next} + {@link tutorial.step_03 Next} diff --git a/docs/tutorial.step_03.ngdoc b/docs/content/tutorial/step_03.ngdoc similarity index 90% rename from docs/tutorial.step_03.ngdoc rename to docs/content/tutorial/step_03.ngdoc index 4fcccf4e..4333636d 100755 --- a/docs/tutorial.step_03.ngdoc +++ b/docs/content/tutorial/step_03.ngdoc @@ -1,23 +1,23 @@ -@workInProgress +@workInProgress @ngdoc overview @name Tutorial: Step 3 @description - + - +
    {@link tutorial.step_00 Previous}{@link tutorial.step_02 Previous} {@link http://angular.github.com/angular-phonecat/step-3/app Example} {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/commit/a03815f8fb00217f5f9c1d3ef83282f79818e706 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_04 Next}
    We did a lot of work in laying the foundation of our app in the last step, so now we'll do something simple, and add full text search. We will also write an end-to-end test, because a good end-to-end test is a good friend. It stays with your app, keeps an eye on it, and quickly detects -regressions. +regressions. __`app/index.html`:__
    @@ -72,7 +72,7 @@ following:
        keeps the two in sync.
     
     In this example, the data that you type into the input box (named __`query`__) is immediately
    -available as a filter input in the list repeater (`phone in phones.$filter(`__`query`__`)`). 
    +available as a filter input in the list repeater (`phone in phones.$filter(`__`query`__`)`).
     Whenever the data model changes and this change causes the input to the repeater to change, the
     repeater will efficiently update the DOM to reflect the current state of the model.
     
    @@ -97,12 +97,12 @@ your browser. This end-to-end test shows the following:
     
     
    -  
    +  
    -  
    +  
    {@link tutorial.step_00 Previous}{@link tutorial.step_02 Previous} {@link http://angular.github.com/angular-phonecat/step-3/app Example} {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/commit/a03815f8fb00217f5f9c1d3ef83282f79818e706 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_04 Next}
    diff --git a/docs/tutorial.step_04.ngdoc b/docs/content/tutorial/step_04.ngdoc similarity index 91% rename from docs/tutorial.step_04.ngdoc rename to docs/content/tutorial/step_04.ngdoc index 559055b6..0589ba75 100755 --- a/docs/tutorial.step_04.ngdoc +++ b/docs/content/tutorial/step_04.ngdoc @@ -1,15 +1,15 @@ -@workInProgress +@workInProgress @ngdoc overview @name Tutorial: Step 4 @description - + - +
    {@link tutorial.step_00 Previous}{@link tutorial.step_03 Previous} {@link http://angular.github.com/angular-phonecat/step-4/app Example} {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-3...step-4 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_05 Next}
    @@ -151,11 +151,11 @@ initializes the data model. - + - +
    {@link tutorial.step_00 Previous}{@link tutorial.step_03 Previous} {@link http://angular.github.com/angular-phonecat/step-4/app Example} {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-3...step-4 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_05 Next}
    diff --git a/docs/tutorial.step_05.ngdoc b/docs/content/tutorial/step_05.ngdoc similarity index 93% rename from docs/tutorial.step_05.ngdoc rename to docs/content/tutorial/step_05.ngdoc index 63ebd64f..8ec0fca4 100755 --- a/docs/tutorial.step_05.ngdoc +++ b/docs/content/tutorial/step_05.ngdoc @@ -1,15 +1,15 @@ -@workInProgress +@workInProgress @ngdoc overview @name Tutorial: Step 5 @description - + - +
    {@link tutorial.step_00 Previous}{@link tutorial.step_04 Previous} {@link http://angular.github.com/angular-phonecat/step-5/app Example} {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-4...step-5 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_06 Next}
    @@ -21,7 +21,7 @@ angular.service.$xhr $xhr} service to make this easy. The addition of the `$xhr` service to our app gives us the opportunity to talk about {@link guide.di Dependency Injection} (DI). The use of DI is another cornerstone of the angular philosophy. DI helps make your web apps well structured, loosely coupled, and ultimately easier to -test. +test. __`app/js/controllers.js:`__
    @@ -137,11 +137,11 @@ reason, we need to:
     
     
    - 
    + 
    - 
    + 
    {@link tutorial.step_00 Previous}{@link tutorial.step_04 Previous} {@link http://angular.github.com/angular-phonecat/step-5/app Example} {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-4...step-5 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_06 Next}
    diff --git a/docs/tutorial.step_06.ngdoc b/docs/content/tutorial/step_06.ngdoc similarity index 83% rename from docs/tutorial.step_06.ngdoc rename to docs/content/tutorial/step_06.ngdoc index 9d6a548e..afe809a6 100755 --- a/docs/tutorial.step_06.ngdoc +++ b/docs/content/tutorial/step_06.ngdoc @@ -1,15 +1,15 @@ -@workInProgress +@workInProgress @ngdoc overview @name Tutorial: Step 6 @description - + - +
    {@link tutorial.step_00 Previous}{@link tutorial.step_05 Previous} {@link http://angular.github.com/angular-phonecat/step-6/app Example} {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-5...step-6 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_07 Next}
    @@ -64,14 +64,14 @@ __`app/phones/phones.json`__ (sample snippet):
      [
       {
    -   "age": 4, 
    +   "age": 4,
        ...
    -   "carrier": "T-Mobile", 
    -   "id": "motorola-defy-with-motoblur", 
    -   "imageUrl": "http://google.com/phone/image/small/640001", 
    -   "name": "Motorola DEFY\u2122 with MOTOBLUR\u2122", 
    +   "carrier": "T-Mobile",
    +   "id": "motorola-defy-with-motoblur",
    +   "imageUrl": "http://google.com/phone/image/small/640001",
    +   "name": "Motorola DEFY\u2122 with MOTOBLUR\u2122",
        "snippet": "Are you ready for everything life throws your way?"
    -  }, 
    +  },
       …
      ]
     
    @@ -93,7 +93,7 @@ __`test/e2e/scenarios.js`__: {@link angular.markup double-curly brace markup} in the href attribute values. These represent attribute bindings, and work the same way as the bindings we saw in previous steps. -* Note also the use of the {@link angular.directive.ng:src ng:src} directive in the `` tag. +* Note also the use of the {@link angular.directive.ng:src ng:src} directive in the `` tag. That directive prevents the browser from treating the angular `{{ exppression }}` markup literally, as it would do if we tried to use markup in a regular `src` attribute. Use `ng:src` to keep the browser from eagerly making an extra http request to an invalid location. @@ -103,11 +103,11 @@ views we will implement in the upcoming steps. - + - +
    {@link tutorial.step_00 Previous}{@link tutorial.step_05 Previous} {@link http://angular.github.com/angular-phonecat/step-6/app Example} {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-5...step-6 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_07 Next}
    diff --git a/docs/tutorial.step_07.ngdoc b/docs/content/tutorial/step_07.ngdoc similarity index 92% rename from docs/tutorial.step_07.ngdoc rename to docs/content/tutorial/step_07.ngdoc index 3c715a79..802130c5 100755 --- a/docs/tutorial.step_07.ngdoc +++ b/docs/content/tutorial/step_07.ngdoc @@ -1,23 +1,23 @@ -@workInProgress +@workInProgress @ngdoc overview @name Tutorial: Step 7 @description - + - +
    {@link tutorial.step_00 Previous}{@link tutorial.step_06 Previous} {@link http://angular.github.com/angular-phonecat/step-7/app Live Demo } {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-6...step-7 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_08 Next}
    Our app is slowly growing and becoming more complex. Up until now, the app provided our users with just one view (the list of all phones), and all of our template code was located in the `index.html` file. The next step in building our app is the addition of a view that will show -detailed information about each of the devices in our list. +detailed information about each of the devices in our list. To add the detailed view, we could expand the `index.html` file to contain template code for both views, but that would get messy very quickly. Instead, we are going to turn the `index.html` @@ -142,13 +142,13 @@ two new View templates: * __The Controller(s).__ We now have a new root controller (`PhoneCatCtrl`) and two sub-controllers (`PhoneListCtrl` and `PhoneDetailCtrl`). These inherit the model properties and -behavior from the root controller. +behavior from the root controller. * __`$route.`__ The root controller's job now is to set up the `$route` configuration: * When the fragment part of the URL in the browser ends in "/phones", `$route` service grabs the `phone-list.html` template, compiles it, and links it with a new scope that is - controlled by our `PhoneListCtrl` controller. + controlled by our `PhoneListCtrl` controller. * When the URL ends in "/phones/:phoneId", `$route` compiles and links the `phone-detail.html` template as it did with `phone-list.html`. But note the use of the @@ -170,12 +170,12 @@ behavior from the root controller. - + - +
    {@link tutorial.step_00 Previous}{@link tutorial.step_06 Previous} {@link http://angular.github.com/angular-phonecat/step-7/app Live Demo } {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-6...step-7 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_08 Next}
    diff --git a/docs/tutorial.step_08.ngdoc b/docs/content/tutorial/step_08.ngdoc similarity index 85% rename from docs/tutorial.step_08.ngdoc rename to docs/content/tutorial/step_08.ngdoc index bd220f5a..65ce6883 100755 --- a/docs/tutorial.step_08.ngdoc +++ b/docs/content/tutorial/step_08.ngdoc @@ -1,16 +1,16 @@ -@workInProgress +@workInProgress @ngdoc overview @name Tutorial: Step 8 @description - + - +
    {@link tutorial.step_00 Previous}{@link tutorial.step_07 Previous} {@link http://angular.github.com/angular-phonecat/step-8/app Live Demo } {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-7...step-8 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_09 Next}
    @@ -69,20 +69,20 @@ __`app/phones/nexus-s.json`:__ (sample snippet)
     {
       "additionalFeatures": "Contour Display, Near Field Communications (NFC), Three-axis gyroscope,
    -  Anti-fingerprint display coating, Internet Calling support (VoIP/SIP)", 
    +  Anti-fingerprint display coating, Internet Calling support (VoIP/SIP)",
       "android": {
    -      "os": "Android 2.3", 
    +      "os": "Android 2.3",
           "ui": "Android"
    -  }, 
    +  },
       ...
       "images": [
    -      "img/phones/nexus-s.0.jpg", 
    -      "img/phones/nexus-s.1.jpg", 
    -      "img/phones/nexus-s.2.jpg", 
    +      "img/phones/nexus-s.0.jpg",
    +      "img/phones/nexus-s.1.jpg",
    +      "img/phones/nexus-s.2.jpg",
           "img/phones/nexus-s.3.jpg"
    -  ], 
    +  ],
       "storage": {
    -      "flash": "16384MB", 
    +      "flash": "16384MB",
           "ram": "512MB"
       }
     }
    @@ -137,12 +137,12 @@ spirit to the one we wrote for the `PhoneListCtrl` controller.
     
     
    -
    +
    -
    +
    {@link tutorial.step_00 Previous}{@link tutorial.step_07 Previous} {@link http://angular.github.com/angular-phonecat/step-8/app Live Demo } {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-7...step-8 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_09 Next}
    diff --git a/docs/tutorial.step_09.ngdoc b/docs/content/tutorial/step_09.ngdoc similarity index 86% rename from docs/tutorial.step_09.ngdoc rename to docs/content/tutorial/step_09.ngdoc index 9d952514..2d6ed925 100755 --- a/docs/tutorial.step_09.ngdoc +++ b/docs/content/tutorial/step_09.ngdoc @@ -1,23 +1,23 @@ -@workInProgress +@workInProgress @ngdoc overview @name Tutorial: Step 9 @description - + - +
    {@link tutorial.step_00 Previous}{@link tutorial.step_08 Previous} {@link http://angular.github.com/angular-phonecat/step-9/app Live Demo } {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-8...step-9 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_10 Next}
    In this step, we have determined that the built-in angular display filters ({@link angular.filter.number number}, {@link angular.filter.currency currency}, {@link angular.filter.date date}, etc.) don't handle what we want to do, so we get to create our own -custom {@link angular.filter filter}. +custom {@link angular.filter filter}. In the previous step, the details page displayed either "true" or "false" to indicate whether certain phone features were present or not. Our custom "checkmark" filter replaces those text @@ -25,7 +25,7 @@ strings with glyphs: ✓ for "true", and ✘ for "false". Our filter code lives in `app/js/filters.js`: -__`app/index.html`:__ +__`app/index.html`:__
     ...
      
    @@ -37,7 +37,7 @@ __`app/index.html`:__
     In the phone details template, we employ our filter for angular expressions whose values are
     "true" or "false"; `{{ [phone_feature] | checkmark }}`:
     
    -__`app/partials/phone-detail.html`:__ 
    +__`app/partials/phone-detail.html`:__
     
     
     

    {{phone.name}}

    @@ -86,23 +86,23 @@ describe('checkmark filter', function() { * This example shows how easy it is to roll your own filters for displaying data. As explained in the "Writing your own Filters" section of the {@link angular.filter angular.filter} page, you -simply register your custom filter function on to the `angular.filter` function. +simply register your custom filter function on to the `angular.filter` function. * In this example, our filter name is "checkmark"; our input is either "true" or "false", and we return one of two unicode characters we have chosen to represent true or false (`\u2713` and -`\u2718`). +`\u2718`). * We created a new unit test to verify that our custom filter converts boolean values to unicode characters. - + - +
    {@link tutorial.step_00 Previous}{@link tutorial.step_08 Previous} {@link http://angular.github.com/angular-phonecat/step-9/app Live Demo } {@link tutorial Tutorial Home} {@link https://github.com/angular/angular-phonecat/compare/step-8...step-9 Code Diff}{@link tutorial.step_00 Next}{@link tutorial.step_10 Next}
    diff --git a/docs/tutorial.step_10.ngdoc b/docs/content/tutorial/step_10.ngdoc similarity index 100% rename from docs/tutorial.step_10.ngdoc rename to docs/content/tutorial/step_10.ngdoc diff --git a/docs/tutorial.step_11.ngdoc b/docs/content/tutorial/step_11.ngdoc similarity index 95% rename from docs/tutorial.step_11.ngdoc rename to docs/content/tutorial/step_11.ngdoc index 34ba7b02..e383f406 100644 --- a/docs/tutorial.step_11.ngdoc +++ b/docs/content/tutorial/step_11.ngdoc @@ -1,4 +1,4 @@ -@workInProgress +@workInProgress @ngdoc overview @name Tutorial: Step 11 @description @@ -15,11 +15,11 @@ Code Diff} And so we arrive at the last step of this tutorial. Here we define a custom service that -represents a {@link http://en.wikipedia.org/wiki/Representational_State_Transfer RESTful} client. +represents a {@link http://en.wikipedia.org/wiki/Representational_State_Transfer RESTful} client. Using this client we can make xhr requests for data in an easier way, without having to deal with the lower-level {@link angular.service.$xhr $xhr} APIs, HTTP methods and URLs. -__`app/index.html`.__ +__`app/index.html`.__
     ...
       
    diff --git a/docs/service.template b/docs/service.template
    deleted file mode 100644
    index 639990ed..00000000
    --- a/docs/service.template
    +++ /dev/null
    @@ -1,57 +0,0 @@
    -

    {{name}}

    - -{{#workInProgress}} -
    - Work In Progress - This page is currently being revised. It might be incomplete or contain inaccuracies. - {{{workInProgress.description}}} -
    -{{/workInProgress}} - -{{#deprecated}} -
    - Deprecated API - {{deprecated}} -
    -{{/deprecated}} - -

    Description

    -{{{description}}} - -

    Dependencies

    -
      - {{#requires}} -
    • {{name}}
    • - {{/requires}} -
    - -{{#method.length}} -

    Methods

    -
      - {{#method}} -
    • {{shortName}}(): {{{description}}}
    • - {{/method}} -
    -{{/method.length}} - -{{#property.length}} -

    Properties

    -
      - {{#property}} -
    • {{name}}:{{#type}}{{type}}{{/type}}{{#description}}: {{{description}}}{{/description}}
    • - {{/property}} -
    -{{/property.length}} - -{{#example}} -

    Example

    -{{{exampleDescription}}} - - -{{/example}} - {{{example}}} -{{#example}} - - {{#scenario}}{{{scenario}}}{{/scenario}} - -{{/example}} diff --git a/docs/src/gen-docs.js b/docs/src/gen-docs.js index 464916b1..9edfaceb 100644 --- a/docs/src/gen-docs.js +++ b/docs/src/gen-docs.js @@ -20,7 +20,7 @@ var work = callback.chain(function(){ var writes = callback.chain(function(){ ngdoc.merge(docs); docs.forEach(function(doc){ - writer.output(doc.id + '.html', doc.html(), writes.waitFor()); + writer.output(doc.section + '/' + doc.id + '.html', doc.html(), writes.waitFor()); }); var metadata = ngdoc.metadata(docs); writer.output('docs-keywords.js', ['NG_PAGES=', JSON.stringify(metadata).replace(/{/g, '\n{'), ';'], writes.waitFor()); diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js index 57202809..869fe4c5 100644 --- a/docs/src/ngdoc.js +++ b/docs/src/ngdoc.js @@ -36,7 +36,6 @@ Doc.METADATA_IGNORE = (function(){ })(); - Doc.prototype = { keywords: function keywords(){ var keywords = {}; @@ -57,6 +56,38 @@ Doc.prototype = { return words.join(' '); }, + + /* + * This function is here to act as a huristic based translator from the old style urls to + * the new style which use sections. + */ + sectionHuristic: function (url){ + // if we are new styl URL with section/id then just return; + if (url.match(/\//)) return url; + var match = url.match(/(\w+)(\.(.*))?/); + var section = match[1]; + var id = match[3] || 'index'; + switch(section) { + case 'angular': + section = 'api'; + id = 'angular.' + id; + break; + case 'api': + case 'cookbook': + case 'guide': + case 'intro': + case 'tutorial': + break; + default: + id = section + '.' + id; + section = 'intro'; + } + var newUrl = section + '/' + (id || 'index'); + console.log('WARNING:', 'found old style url', url, 'at', this.file, this.line, + 'converting to', newUrl); + return newUrl; + }, + markdown: function (text) { var self = this; var IS_URL = /^(https?:\/\/|ftps?:\/\/|mailto:|\.|\/)/; @@ -70,7 +101,7 @@ Doc.prototype = { parts.forEach(function(text, i){ if (text.match(/^
    /)) {
             text = text.replace(/^
    ([\s\S]*)<\/pre>/mi, function(_, content){
    -          var clazz = 'brush: js;'
    +          var clazz = 'brush: js;';
               if (content.match(/\<\w/)) {
                 // we are HTML
                 clazz += ' html-script: true;';
    @@ -93,7 +124,8 @@ Doc.prototype = {
             text = text.replace(//gm, '<angular/>');
             text = text.replace(/{@link\s+([^\s}]+)\s*([^}]*?)\s*}/g,
               function(_all, url, title){
    -            return ''
    +            var isFullUrl = url.match(IS_URL);
    +            return ''
                   + (url.match(IS_ANGULAR) ? '' : '')
                   + (title || url).replace(/\n/g, ' ')
                   + (url.match(IS_ANGULAR) ? '' : '')
    @@ -525,6 +557,7 @@ function metadata(docs){
         var depth = path.length - 1;
         var shortName = path.pop();
         words.push({
    +      section: doc.section,
           id: doc.id,
           name: doc.name,
           depth: depth,
    @@ -538,7 +571,7 @@ function metadata(docs){
     }
     
     var KEYWORD_PRIORITY = {
    -  '.started': 1,
    +  '.index': 1,
       '.guide': 2,
       '.guide.overview': 1,
       '.angular': 7,
    @@ -562,7 +595,7 @@ function keywordSort(a, b){
           mangled.push(KEYWORD_PRIORITY[partialName] || 5);
           mangled.push(name);
         });
    -    return mangled.join('.');
    +    return doc.section + '/' + mangled.join('.');
       }
       var nameA = mangleName(a);
       var nameB = mangleName(b);
    diff --git a/docs/src/reader.js b/docs/src/reader.js
    index 300b17f0..f20bc06e 100644
    --- a/docs/src/reader.js
    +++ b/docs/src/reader.js
    @@ -9,15 +9,13 @@ var fs       = require('fs'),
     var NEW_LINE = /\n\r?/;
     
     function collect(callback){
    -/*
        findJsFiles('src', callback.waitMany(function(file) {
    -     //console.log('reading', file, '...');
    +     console.log('reading', file, '...');
          findNgDocInJsFile(file, callback.waitMany(function(doc, line) {
    -       callback(doc, file, line);
    +       callback('@section api\n' + doc, file, line);
         }));
       }));
    -*/
    -  findNgDocInDir('docs/', callback.waitMany(callback));
    +  findNgDocInDir('docs/content', callback.waitMany(callback));
       callback.done();
     }
     
    @@ -42,11 +40,18 @@ function findNgDocInDir(directory, docNotify) {
       fs.readdir(directory, docNotify.waitFor(function(err, files){
         if (err) return this.error(err);
         files.forEach(function(file){
    -      //console.log('reading', directory + file, '...');
    -      if (!file.match(/tutorial.*\.ngdoc$/)) return;
    -      fs.readFile(directory + file, docNotify.waitFor(function(err, content){
    +      fs.stat(directory + '/' + file, docNotify.waitFor(function(err, stats){
             if (err) return this.error(err);
    -        docNotify(content.toString(), directory + file, 1);
    +        if (stats.isFile()) {
    +          console.log('reading', directory + '/' + file, '...');
    +          fs.readFile(directory + '/' + file, docNotify.waitFor(function(err, content){
    +            if (err) return this.error(err);
    +            var section = '@section ' + directory.split('/').pop() + '\n';
    +            docNotify(section + content.toString(), directory + '/' +file, 1);
    +          }));
    +        } else if(stats.isDirectory()) {
    +          findNgDocInDir(directory + '/' + file, docNotify.waitFor(docNotify));
    +        }
           }));
         });
         docNotify.done();
    diff --git a/docs/src/templates/docs.css b/docs/src/templates/docs.css
    index f5b9275b..4f47367d 100644
    --- a/docs/src/templates/docs.css
    +++ b/docs/src/templates/docs.css
    @@ -18,6 +18,24 @@ a {
       height: 3.5em;
     }
     
    +#header .navigation {
    +  position: absolute;
    +  text-align: center;
    +  top: 0;
    +  right: 0;
    +  left: 0;
    +  margin: 0;
    +  padding: 0;
    +}
    +#header .navigation > li {
    +  display: inline;
    +  padding: 0 .5em;
    +}
    +
    +#header .navigation > li.selected {
    +  font-weight: bold;
    +}
    +
     #sidebar,
     #main {
       position: absolute;
    @@ -191,12 +209,8 @@ a {
       margin-top: 0;
     }
     
    -#sidebar ul li.level-1.level-angular {
    +#sidebar ul li.monospace{
       font-family: monospace;
    -  font-weight: normal;
    -  font-size: 1em;
    -  margin-top: 0;
    -  margin-bottom: 0;
     }
     
     #sidebar ul li.level-1 {
    @@ -208,17 +222,14 @@ a {
     
     #sidebar ul li.level-2 {
       margin-left: 2em;
    -  font-family: monospace;
     }
     
     #sidebar ul li.level-3 {
       margin-left: 3em;
    -  font-family: monospace;
     }
     
     #sidebar ul li.level-4 {
       margin-left: 4em;
    -  font-family: monospace;
     }
     
     
    diff --git a/docs/src/templates/docs.js b/docs/src/templates/docs.js
    index 9483496e..47bb87a6 100644
    --- a/docs/src/templates/docs.js
    +++ b/docs/src/templates/docs.js
    @@ -1,8 +1,8 @@
     var HAS_HASH = /#/;
     DocsController.$inject = ['$location', '$browser', '$window'];
     function DocsController($location, $browser, $window) {
    -  this.pages = NG_PAGES;
       window.$root = this.$root;
    +  var self = this;
       this.$location = $location;
     
       if (!HAS_HASH.test($location.href)) {
    @@ -11,28 +11,36 @@ function DocsController($location, $browser, $window) {
     
       this.$watch('$location.hashPath', function(hashPath) {
         if (hashPath.match(/^!/)) {
    -      this.partialId = hashPath.substring(1);
    -      this.partialTitle = (angular.Array.filter(NG_PAGES, {id:this.partialId})[0]||{}).name;
    +      var parts = hashPath.substring(1).split('/');
    +      self.sectionId = parts[0];
    +      self.partialId = parts[1] || 'index';
    +      self.pages = angular.Array.filter(NG_PAGES, {section:self.sectionId});
    +      self.partialTitle = (angular.Array.filter(self.pages, function(doc){return doc.id == self.partialId;})[0]||{}).name;
         }
       });
     
       this.getUrl = function(page){
    -    return '#!' + page.id;
    +    return '#!' + page.section + '/' + page.id;
       };
     
       this.getCurrentPartial = function(){
    -    return './' + this.partialId + '.html';
    +    return './' + this.sectionId + '/' + this.partialId + '.html';
       };
     
       this.getClass = function(page) {
         var depth = page.depth,
             cssClass = 'level-' + depth + (page.name == this.partialId ? ' selected' : '');
     
    -    if (depth == 1 && page.type !== 'overview') cssClass += ' level-angular';
    +    if (page.section == 'api')
    +      cssClass += ' monospace';
     
         return cssClass;
       };
     
    +  this.selectedSection = function(section) {
    +    return section == self.sectionId ? 'selected' : null;
    +  };
    +
       this.afterPartialLoaded = function() {
         SyntaxHighlighter.highlight();
       };
    diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html
    index 63e8d871..1c3dd3a6 100644
    --- a/docs/src/templates/index.html
    +++ b/docs/src/templates/index.html
    @@ -4,23 +4,36 @@
           ng:controller="DocsController">
     
       <angular/>
    -
       
    -
       
       
       
       
    -
    -  
    -  
    -  
    -  
    -
    -  
    -  
    -  
    -  
    +