From f7d28cd377f06224247b950680517a187a7b6749 Mon Sep 17 00:00:00 2001 From: Caitlin Potter Date: Thu, 6 Feb 2014 14:02:18 +0000 Subject: docs(all): convert
/
snippets to GFM snippets --- src/ng/directive/booleanAttrs.js | 28 ++++++++++++++-------------- src/ng/directive/input.js | 4 ++-- src/ng/directive/ngCloak.js | 4 ++-- src/ng/directive/ngCsp.js | 4 ++-- src/ng/directive/ngPluralize.js | 8 ++++---- src/ng/directive/ngRepeat.js | 8 ++++---- src/ng/directive/ngShowHide.js | 24 ++++++++++++------------ 7 files changed, 40 insertions(+), 40 deletions(-) (limited to 'src/ng/directive') 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: - *
+ * ```html
  * 
- * 
+ * ``` * * The correct way to write it: - *
+ * ```html
  * 
- * 
+ * ``` * * @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: - *
+ * ```html
  * 
- * 
+ * ``` * * The correct way to write it: - *
+ * ```html
  * 
- * 
+ * ``` * * @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: - *
+ * ```html
  * 
- * 
+ * ``` * * The correct way to write it: - *
+ * ```html
  * 
- * 
+ * ``` * * @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: - *
+ * ```html
  * 
* *
- *
+ * ``` * * 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.} $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. - *
+ *      ```js
  *      function formatter(value) {
  *        if (value) {
  *          return value.toUpperCase();
  *        }
  *      }
  *      ngModel.$formatters.push(formatter);
- *      
+ * ``` * * @property {Array.} $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}). * - *
+ * ```css
  * [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
  *   display: none !important;
  * }
- * 
+ * ``` * * 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. -
+   ```html
      
      
      ...
      ...
      
-   
+ ``` */ // 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: * - *
+ * ```html
  * 
  * 
- *
+ *``` * * 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: * - *
+ * ```html
  * 
  * 
- * 
+ * ``` * * 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: - *
+ * ```html
  *   
* Header {{ item }} *
@@ -40,10 +40,10 @@ *
* Footer {{ item }} *
- *
+ * ``` * * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to: - *
+ * ```html
  *   
* Header A *
@@ -62,7 +62,7 @@ *
* Footer B *
- *
+ * ``` * * 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}). * - *
+ * ```html
  * 
  * 
* * *
- *
+ * ``` * * 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: - *
+ * ```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;
  * }
- * 
+ * ``` * * 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. * - *
+ * ```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 { ... }
- * 
+ * ``` * * @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}). * - *
+ * ```hrml
  * 
  * 
* * *
- *
+ * ``` * * 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: - *
+ * ```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;
  * }
- * 
+ * ``` * * 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. * - *
+ * ```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 { ... }
- * 
+ * ``` * * @animations * removeClass: .ng-hide - happens after the ngHide expression evaluates to a truthy value and just before the contents are set to hidden -- cgit v1.2.3