aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive
diff options
context:
space:
mode:
authorCaitlin Potter2014-02-06 14:02:18 +0000
committerPeter Bacon Darwin2014-02-16 19:03:40 +0000
commitf7d28cd377f06224247b950680517a187a7b6749 (patch)
tree20203b9f7bf60748bb752f325b1869415352a6f3 /src/ng/directive
parent2e641ac49f121a6e2cc70bd3879930b44a8a7710 (diff)
downloadangular.js-f7d28cd377f06224247b950680517a187a7b6749.tar.bz2
docs(all): convert <pre>/</pre> snippets to GFM snippets
Diffstat (limited to 'src/ng/directive')
-rw-r--r--src/ng/directive/booleanAttrs.js28
-rw-r--r--src/ng/directive/input.js4
-rw-r--r--src/ng/directive/ngCloak.js4
-rw-r--r--src/ng/directive/ngCsp.js4
-rw-r--r--src/ng/directive/ngPluralize.js8
-rw-r--r--src/ng/directive/ngRepeat.js8
-rw-r--r--src/ng/directive/ngShowHide.js24
7 files changed, 40 insertions, 40 deletions
diff --git a/src/ng/directive/booleanAttrs.js b/src/ng/directive/booleanAttrs.js
index d2ba61df..b49105cd 100644
--- a/src/ng/directive/booleanAttrs.js
+++ b/src/ng/directive/booleanAttrs.js
@@ -16,14 +16,14 @@
* The `ngHref` directive solves this problem.
*
* The wrong way to write it:
- * <pre>
+ * ```html
* <a href="http://www.gravatar.com/avatar/{{hash}}"/>
- * </pre>
+ * ```
*
* The correct way to write it:
- * <pre>
+ * ```html
* <a ng-href="http://www.gravatar.com/avatar/{{hash}}"/>
- * </pre>
+ * ```
*
* @element A
* @param {template} ngHref any string which can contain `{{}}` markup.
@@ -106,14 +106,14 @@
* `{{hash}}`. The `ngSrc` directive solves this problem.
*
* The buggy way to write it:
- * <pre>
+ * ```html
* <img src="http://www.gravatar.com/avatar/{{hash}}"/>
- * </pre>
+ * ```
*
* The correct way to write it:
- * <pre>
+ * ```html
* <img ng-src="http://www.gravatar.com/avatar/{{hash}}"/>
- * </pre>
+ * ```
*
* @element IMG
* @param {template} ngSrc any string which can contain `{{}}` markup.
@@ -132,14 +132,14 @@
* `{{hash}}`. The `ngSrcset` directive solves this problem.
*
* The buggy way to write it:
- * <pre>
+ * ```html
* <img srcset="http://www.gravatar.com/avatar/{{hash}} 2x"/>
- * </pre>
+ * ```
*
* The correct way to write it:
- * <pre>
+ * ```html
* <img ng-srcset="http://www.gravatar.com/avatar/{{hash}} 2x"/>
- * </pre>
+ * ```
*
* @element IMG
* @param {template} ngSrcset any string which can contain `{{}}` markup.
@@ -154,11 +154,11 @@
* @description
*
* The following markup will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:
- * <pre>
+ * ```html
* <div ng-init="scope = { isDisabled: false }">
* <button disabled="{{scope.isDisabled}}">Disabled</button>
* </div>
- * </pre>
+ * ```
*
* The HTML specification does not require browsers to preserve the values of boolean attributes
* such as disabled. (Their presence means true and their absence means false.)
diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js
index ced50167..1a357805 100644
--- a/src/ng/directive/input.js
+++ b/src/ng/directive/input.js
@@ -861,14 +861,14 @@ var VALID_CLASS = 'ng-valid',
* @property {Array.<Function>} $formatters Array of functions to execute, as a pipeline, whenever
the model value changes. Each function is called, in turn, passing the value through to the
next. Used to format / convert values for display in the control and validation.
- * <pre>
+ * ```js
* function formatter(value) {
* if (value) {
* return value.toUpperCase();
* }
* }
* ngModel.$formatters.push(formatter);
- * </pre>
+ * ```
*
* @property {Array.<Function>} $viewChangeListeners Array of functions to execute whenever the
* view value has changed. It is called with no arguments, and its return value is ignored.
diff --git a/src/ng/directive/ngCloak.js b/src/ng/directive/ngCloak.js
index 0ef5090f..42b0224f 100644
--- a/src/ng/directive/ngCloak.js
+++ b/src/ng/directive/ngCloak.js
@@ -18,11 +18,11 @@
* `angular.min.js`.
* For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
*
- * <pre>
+ * ```css
* [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
* display: none !important;
* }
- * </pre>
+ * ```
*
* When this css rule is loaded by the browser, all html elements (including their children) that
* are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive
diff --git a/src/ng/directive/ngCsp.js b/src/ng/directive/ngCsp.js
index 9dc93f81..38508bb4 100644
--- a/src/ng/directive/ngCsp.js
+++ b/src/ng/directive/ngCsp.js
@@ -29,13 +29,13 @@
*
* @example
* This example shows how to apply the `ngCsp` directive to the `html` tag.
- <pre>
+ ```html
<!doctype html>
<html ng-app ng-csp>
...
...
</html>
- </pre>
+ ```
*/
// ngCsp is not implemented as a proper directive any more, because we need it be processed while we bootstrap
diff --git a/src/ng/directive/ngPluralize.js b/src/ng/directive/ngPluralize.js
index a33735e9..d6ad861f 100644
--- a/src/ng/directive/ngPluralize.js
+++ b/src/ng/directive/ngPluralize.js
@@ -36,13 +36,13 @@
*
* The following example shows how to configure ngPluralize:
*
- * <pre>
+ * ```html
* <ng-pluralize count="personCount"
when="{'0': 'Nobody is viewing.',
* 'one': '1 person is viewing.',
* 'other': '{} people are viewing.'}">
* </ng-pluralize>
- *</pre>
+ *```
*
* In the example, `"0: Nobody is viewing."` is an explicit number rule. If you did not
* specify this rule, 0 would be matched to the "other" category and "0 people are viewing"
@@ -62,7 +62,7 @@
* The offset attribute allows you to offset a number by any desired value.
* Let's take a look at an example:
*
- * <pre>
+ * ```html
* <ng-pluralize count="personCount" offset=2
* when="{'0': 'Nobody is viewing.',
* '1': '{{person1}} is viewing.',
@@ -70,7 +70,7 @@
* 'one': '{{person1}}, {{person2}} and one other person are viewing.',
* 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}">
* </ng-pluralize>
- * </pre>
+ * ```
*
* Notice that we are still using two plural categories(one, other), but we added
* three explicit number rules 0, 1 and 2.
diff --git a/src/ng/directive/ngRepeat.js b/src/ng/directive/ngRepeat.js
index f83bb88f..41146fdc 100644
--- a/src/ng/directive/ngRepeat.js
+++ b/src/ng/directive/ngRepeat.js
@@ -30,7 +30,7 @@
* up to and including the ending HTML tag where **ng-repeat-end** is placed.
*
* The example below makes use of this feature:
- * <pre>
+ * ```html
* <header ng-repeat-start="item in items">
* Header {{ item }}
* </header>
@@ -40,10 +40,10 @@
* <footer ng-repeat-end>
* Footer {{ item }}
* </footer>
- * </pre>
+ * ```
*
* And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:
- * <pre>
+ * ```html
* <header>
* Header A
* </header>
@@ -62,7 +62,7 @@
* <footer>
* Footer B
* </footer>
- * </pre>
+ * ```
*
* The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such
* as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).
diff --git a/src/ng/directive/ngShowHide.js b/src/ng/directive/ngShowHide.js
index c4754bee..a6b47b9c 100644
--- a/src/ng/directive/ngShowHide.js
+++ b/src/ng/directive/ngShowHide.js
@@ -11,13 +11,13 @@
* in AngularJS and sets the display style to none (using an !important flag).
* For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
*
- * <pre>
+ * ```html
* <!-- when $scope.myValue is truthy (element is visible) -->
* <div ng-show="myValue"></div>
*
* <!-- when $scope.myValue is falsy (element is hidden) -->
* <div ng-show="myValue" class="ng-hide"></div>
- * </pre>
+ * ```
*
* When the ngShow expression evaluates to false then the ng-hide CSS class is added to the class attribute
* on the element causing it to become hidden. When true, the ng-hide CSS class is removed
@@ -38,7 +38,7 @@
*
* If you wish to change the hide behavior with ngShow/ngHide then this can be achieved by
* restating the styles for the .ng-hide class in CSS:
- * <pre>
+ * ```css
* .ng-hide {
* //!annotate CSS Specificity|Not to worry, this will override the AngularJS default...
* display:block!important;
@@ -48,7 +48,7 @@
* top:-9999px;
* left:-9999px;
* }
- * </pre>
+ * ```
*
* Just remember to include the important flag so the CSS override will function.
*
@@ -64,7 +64,7 @@
* you must also include the !important flag to override the display property
* so that you can perform an animation when the element is hidden during the time of the animation.
*
- * <pre>
+ * ```css
* //
* //a working example can be found at the bottom of this page
* //
@@ -77,7 +77,7 @@
* .my-element.ng-hide-add.ng-hide-add-active { ... }
* .my-element.ng-hide-remove { ... }
* .my-element.ng-hide-remove.ng-hide-remove-active { ... }
- * </pre>
+ * ```
*
* @animations
* addClass: .ng-hide - happens after the ngShow expression evaluates to a truthy value and the just before contents are set to visible
@@ -168,13 +168,13 @@ var ngShowDirective = ['$animate', function($animate) {
* in AngularJS and sets the display style to none (using an !important flag).
* For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
*
- * <pre>
+ * ```hrml
* <!-- when $scope.myValue is truthy (element is hidden) -->
* <div ng-hide="myValue"></div>
*
* <!-- when $scope.myValue is falsy (element is visible) -->
* <div ng-hide="myValue" class="ng-hide"></div>
- * </pre>
+ * ```
*
* When the ngHide expression evaluates to true then the .ng-hide CSS class is added to the class attribute
* on the element causing it to become hidden. When false, the ng-hide CSS class is removed
@@ -195,7 +195,7 @@ var ngShowDirective = ['$animate', function($animate) {
*
* If you wish to change the hide behavior with ngShow/ngHide then this can be achieved by
* restating the styles for the .ng-hide class in CSS:
- * <pre>
+ * ```css
* .ng-hide {
* //!annotate CSS Specificity|Not to worry, this will override the AngularJS default...
* display:block!important;
@@ -205,7 +205,7 @@ var ngShowDirective = ['$animate', function($animate) {
* top:-9999px;
* left:-9999px;
* }
- * </pre>
+ * ```
*
* Just remember to include the important flag so the CSS override will function.
*
@@ -221,7 +221,7 @@ var ngShowDirective = ['$animate', function($animate) {
* you must also include the !important flag to override the display property so
* that you can perform an animation when the element is hidden during the time of the animation.
*
- * <pre>
+ * ```css
* //
* //a working example can be found at the bottom of this page
* //
@@ -234,7 +234,7 @@ var ngShowDirective = ['$animate', function($animate) {
* .my-element.ng-hide-add.ng-hide-add-active { ... }
* .my-element.ng-hide-remove { ... }
* .my-element.ng-hide-remove.ng-hide-remove-active { ... }
- * </pre>
+ * ```
*
* @animations
* removeClass: .ng-hide - happens after the ngHide expression evaluates to a truthy value and just before the contents are set to hidden