From 7e2e7b07b6a79a64891f3f2408fb6c325a499e51 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Sat, 2 Jul 2011 01:38:03 +0200 Subject: doc($route): fix $route example and couple of typos Rewrite $route example a bit, as it required $location and $route services to be eager published in the root scope. Fix small typos in formatter and ng:options docs. --- docs/examples/book.html | 2 ++ docs/examples/chapter.html | 3 +++ src/formatters.js | 4 ++-- src/service/route.js | 36 ++++++++++++++++++++---------------- src/widgets.js | 6 +++--- 5 files changed, 30 insertions(+), 21 deletions(-) create mode 100644 docs/examples/book.html create mode 100644 docs/examples/chapter.html diff --git a/docs/examples/book.html b/docs/examples/book.html new file mode 100644 index 00000000..10d4dd91 --- /dev/null +++ b/docs/examples/book.html @@ -0,0 +1,2 @@ +controller: {{name}}
+Book Id: {{params.bookId}}
diff --git a/docs/examples/chapter.html b/docs/examples/chapter.html new file mode 100644 index 00000000..5f11f704 --- /dev/null +++ b/docs/examples/chapter.html @@ -0,0 +1,3 @@ +controller: {{name}}
+Book Id: {{prams.bookId}}
+Chapter Id: {{params.chapterId}} diff --git a/src/formatters.js b/src/formatters.js index 3eb71bfd..87d4602f 100644 --- a/src/formatters.js +++ b/src/formatters.js @@ -13,8 +13,8 @@ * * {@link angular.formatter.index index} - Manages indexing into an HTML select widget * * {@link angular.formatter.json json} - Formats user input in JSON format * * {@link angular.formatter.list list} - Formats user input string as an array - * * {@link angular.formatter.number} - Formats user input strings as a number - * * {@link angular.formatter.trim} - Trims extras spaces from end of user input + * * {@link angular.formatter.number number} - Formats user input strings as a number + * * {@link angular.formatter.trim trim} - Trims extras spaces from end of user input * * For more information about how angular formatters work, and how to create your own formatters, * see {@link guide/dev_guide.templates.formatters Understanding Angular Formatters} in the angular diff --git a/src/service/route.js b/src/service/route.js index 19fc81bf..b04c5ebb 100644 --- a/src/service/route.js +++ b/src/service/route.js @@ -22,13 +22,16 @@ - Chose: - Moby | - Moby: Ch1 | - Gatsby | - Gatsby: Ch4
- -
$location={{$location}}
-
$route.current.template={{$route.current.template}}
-
$route.current.params={{$route.current.params}}
-
$route.current.scope.name={{$route.current.scope.name}}
-
- +
+ Choose: + Moby | + Moby: Ch1 | + Gatsby | + Gatsby: Ch4
+ $location.hashPath: +
$route.current.template = {{$route.current.template}}
+
$route.current.params = {{$route.current.params}}
+
$route.current.scope.name = {{$route.current.scope.name}}
+
+ +
diff --git a/src/widgets.js b/src/widgets.js index 3e1d6f55..3a7fa2a3 100644 --- a/src/widgets.js +++ b/src/widgets.js @@ -597,9 +597,9 @@ angularWidget('button', inputWidgetSelector); * @param {comprehension_expression} comprehension _expresion_ `for` _item_ `in` _array_. * * * _array_: an expression which evaluates to an array of objects to bind. - * * _item_: local variable which will reffer to the item in the _array_ during the itteration - * * _expression_: The result of this expression will is `option` label. The - * `expression` most likely reffers to the _item_ varibale. + * * _item_: local variable which will refer to the item in the _array_ during the iteration + * * _expression_: The result of this expression will be `option` label. The + * `expression` most likely refers to the _item_ variable. * * @example -- cgit v1.2.3