From 1b1684c2b20a75df677426d4e4a61d51af3b5c44 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Sun, 21 Jul 2019 18:00:47 +0300 Subject: [PATCH] docs($compile): fix typos and incorrect example (cherry picked from commit 1147f0e213d4b79c4878639ef0ed56afe457a860) --- src/ng/compile.js | 65 ++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/src/ng/compile.js b/src/ng/compile.js index 4afb7caee72a..36b60209fb8d 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -205,7 +205,7 @@ * * This example show how you might use `$doCheck` to trigger changes in your component's inputs even if the * actual identity of the component doesn't change. (Be aware that cloning and deep equality checks on large - * arrays or objects can have a negative impact on your application performance) + * arrays or objects can have a negative impact on your application performance.) * * * @@ -528,7 +528,7 @@ * would result in the whole app "stalling" until all templates are loaded asynchronously - even in the * case when only one deeply nested directive has `templateUrl`. * - * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache} + * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}. * * You can specify `templateUrl` as a string representing the URL or as a function which takes two * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns @@ -589,7 +589,7 @@ * own templates or compile functions. Compiling these directives results in an infinite loop and * stack overflow errors. * - * This can be avoided by manually using $compile in the postLink function to imperatively compile + * This can be avoided by manually using `$compile` in the postLink function to imperatively compile * a directive's template instead of relying on automatic template compilation via `template` or * `templateUrl` declaration or manual compilation inside the compile function. * @@ -693,17 +693,17 @@ * * * `true` - transclude the content (i.e. the child nodes) of the directive's element. * * `'element'` - transclude the whole of the directive's element including any directives on this - * element that defined at a lower priority than this directive. When used, the `template` + * element that are defined at a lower priority than this directive. When used, the `template` * property is ignored. * * **`{...}` (an object hash):** - map elements of the content onto transclusion "slots" in the template. * - * **Mult-slot transclusion** is declared by providing an object for the `transclude` property. + * **Multi-slot transclusion** is declared by providing an object for the `transclude` property. * * This object is a map where the keys are the name of the slot to fill and the value is an element selector * used to match the HTML to the slot. The element selector should be in normalized form (e.g. `myElement`) * and will match the standard element variants (e.g. `my-element`, `my:element`, `data-my-element`, etc). * - * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives} + * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}. * * If the element selector is prefixed with a `?` then that slot is optional. * @@ -728,7 +728,7 @@ * * * If you want to manually control the insertion and removal of the transcluded content in your directive - * then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery + * then you must use this transclude function. When you call a transclude function it returns a jqLite/JQuery * object that contains the compiled DOM, which is linked to the correct transclusion scope. * * When you call a transclusion function you can pass in a **clone attach function**. This function accepts @@ -813,8 +813,8 @@ * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the * `link()` or `compile()` functions. It has a variety of uses. * - * * *Accessing normalized attribute names:* Directives like 'ngBind' can be expressed in many ways: - * 'ng:bind', `data-ng-bind`, or 'x-ng-bind'. The attributes object allows for normalized access + * * *Accessing normalized attribute names:* Directives like `ngBind` can be expressed in many ways: + * `ng:bind`, `data-ng-bind`, or `x-ng-bind`. The attributes object allows for normalized access * to the attributes. * * * *Directive inter-communication:* All directives share the same instance of the attributes @@ -855,25 +855,24 @@