diff options
| author | Caitlin Potter | 2014-02-06 14:02:18 +0000 | 
|---|---|---|
| committer | Peter Bacon Darwin | 2014-02-16 19:03:40 +0000 | 
| commit | f7d28cd377f06224247b950680517a187a7b6749 (patch) | |
| tree | 20203b9f7bf60748bb752f325b1869415352a6f3 /src/ng/compile.js | |
| parent | 2e641ac49f121a6e2cc70bd3879930b44a8a7710 (diff) | |
| download | angular.js-f7d28cd377f06224247b950680517a187a7b6749.tar.bz2 | |
docs(all): convert <pre>/</pre> snippets to GFM snippets
Diffstat (limited to 'src/ng/compile.js')
| -rw-r--r-- | src/ng/compile.js | 28 | 
1 files changed, 14 insertions, 14 deletions
| diff --git a/src/ng/compile.js b/src/ng/compile.js index 219f99ae..dd8d001c 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -50,7 +50,7 @@   *   * Here's an example directive declared with a Directive Definition Object:   * - * <pre> + * ```js   *   var myModule = angular.module(...);   *   *   myModule.directive('directiveName', function factory(injectables) { @@ -83,7 +83,7 @@   *     };   *     return directiveDefinitionObject;   *   }); - * </pre> + * ```   *   * <div class="alert alert-warning">   * **Note:** Any unspecified options will use the default value. You can see the default values below. @@ -91,7 +91,7 @@   *   * Therefore the above can be simplified as:   * - * <pre> + * ```js   *   var myModule = angular.module(...);   *   *   myModule.directive('directiveName', function factory(injectables) { @@ -102,7 +102,7 @@   *     // or   *     // return function postLink(scope, iElement, iAttrs) { ... }   *   }); - * </pre> + * ```   *   *   * @@ -256,9 +256,9 @@   *   * #### `compile`   * - * <pre> + * ```js   *   function compile(tElement, tAttrs, transclude) { ... } - * </pre> + * ```   *   * The compile function deals with transforming the template DOM. Since most directives do not do   * template transformation, it is not used often. Examples that require compile functions are @@ -301,9 +301,9 @@   * #### `link`   * This property is used only if the `compile` property is not defined.   * - * <pre> + * ```js   *   function link(scope, iElement, iAttrs, controller, transcludeFn) { ... } - * </pre> + * ```   *   * The link function is responsible for registering DOM listeners as well as updating the DOM. It is   * executed after the template has been cloned. This is where most of the directive logic will be @@ -361,7 +361,7 @@   *   the only way to easily get the actual value because during the linking phase the interpolation   *   hasn't been evaluated yet and so the value is at this time set to `undefined`.   * - * <pre> + * ```js   * function linkingFn(scope, elm, attrs, ctrl) {   *   // get the attribute value   *   console.log(attrs.ngModel); @@ -374,7 +374,7 @@   *     console.log('ngModel has changed value to ' + value);   *   });   * } - * </pre> + * ```   *   * Below is an example using `$compileProvider`.   * @@ -465,14 +465,14 @@   *   * - If you are not asking the linking function to clone the template, create the DOM element(s)   *   before you send them to the compiler and keep this reference around. - *   <pre> + *   ```js   *     var element = $compile('<p>{{total}}</p>')(scope); - *   </pre> + *   ```   *   * - if on the other hand, you need the element to be cloned, the view reference from the original   *   example would not point to the clone, but rather to the original template that was cloned. In   *   this case, you can access the clone via the cloneAttachFn: - *   <pre> + *   ```js   *     var templateElement = angular.element('<p>{{total}}</p>'),   *         scope = ....;   * @@ -481,7 +481,7 @@   *     });   *   *     //now we have reference to the cloned DOM via `clonedElement` - *   </pre> + *   ```   *   *   * For information on how the compiler works, see the | 
