Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit e245028

Browse files
committed
docs(ngMessageFormat): remove docs for 256messageFormat
This was a private service which should not be documented. The general docs have been moved to the ngMessageFormat module namespace
1 parent 3e3d9a0 commit e245028

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

src/ngMessageFormat/messageFormatService.js

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,26 @@
1010
/* global stringify: false */
1111

1212
/**
13-
* @ngdoc service
14-
* @name $$messageFormat
13+
* @ngdoc module
14+
* @name ngMessageFormat
15+
* @packageName angular-message-format
1516
*
1617
* @description
17-
* Angular internal service to recognize MessageFormat extensions in interpolation expressions.
18-
* For more information, see:
19-
* https://docs.google.com/a/google.com/document/d/1pbtW2yvtmFBikfRrJd8VAsabiFkKezmYZ_PbgdjQOVU/edit
2018
*
21-
* @example
22-
* ## Gender
19+
* ## What is ngMessageFormat?
20+
*
21+
* The ngMessageFormat module extends the Angular {@link ng.$interpolate `$interpolate`} service
22+
* with a syntax for handling pluralization and gender specific messages, which is based on the
23+
* [ICU MessageFormat syntax][ICU].
24+
*
25+
* See [the design doc][ngMessageFormat doc] for more information.
26+
*
27+
* [ICU]: http://userguide.icu-project.org/formatparse/messages#TOC-MessageFormat
28+
* [ngMessageFormat doc]: https://docs.google.com/a/google.com/document/d/1pbtW2yvtmFBikfRrJd8VAsabiFkKezmYZ_PbgdjQOVU/edit
29+
*
30+
* ## Examples
31+
*
32+
* ### Gender
2333
*
2434
* This example uses the "select" keyword to specify the message based on gender.
2535
*
@@ -54,8 +64,7 @@
5464
* </file>
5565
* </example>
5666
*
57-
* @example
58-
* ## Plural
67+
* ### Plural
5968
*
6069
* This example shows how the "plural" keyword is used to account for a variable number of entities.
6170
* The "#" variable holds the current number and can be embedded in the message.
@@ -128,8 +137,7 @@
128137
* </file>
129138
* </example>
130139
*
131-
* @example
132-
* ## Plural and Gender
140+
* ### Plural and Gender together
133141
*
134142
* This example shows how you can specify gender rules for specific plural matches - in this case,
135143
* =1 is special cased for gender.
@@ -170,6 +178,12 @@
170178
* </file>
171179
</example>
172180
*/
181+
var module = window['angular']['module']('ngMessageFormat', ['ng']);
182+
module['factory']('$$messageFormat', $$MessageFormatFactory);
183+
module['config'](['$provide', function($provide) {
184+
$provide['decorator']('$interpolate', $$interpolateDecorator);
185+
}]);
186+
173187
var $$MessageFormatFactory = ['$parse', '$locale', '$sce', '$exceptionHandler', function $$messageFormat(
174188
$parse, $locale, $sce, $exceptionHandler) {
175189

@@ -205,17 +219,4 @@ var $$interpolateDecorator = ['$$messageFormat', '$delegate', function $$interpo
205219
interpolate['startSymbol'] = $interpolate['startSymbol'];
206220
interpolate['endSymbol'] = $interpolate['endSymbol'];
207221
return interpolate;
208-
}];
209-
210-
211-
/**
212-
* @ngdoc module
213-
* @name ngMessageFormat
214-
* @packageName angular-message-format
215-
* @description
216-
*/
217-
var module = window['angular']['module']('ngMessageFormat', ['ng']);
218-
module['factory']('$$messageFormat', $$MessageFormatFactory);
219-
module['config'](['$provide', function($provide) {
220-
$provide['decorator']('$interpolate', $$interpolateDecorator);
221-
}]);
222+
}];

0 commit comments

Comments
 (0)