@@ -2811,7 +2811,7 @@ var version = {
2811
2811
major: 1,
2812
2812
minor: 7,
2813
2813
dot: 9,
2814
- codeName: 'indeterminate-frosting '
2814
+ codeName: 'pollution-eradication '
2815
2815
};
2816
2816
2817
2817
@@ -7462,7 +7462,7 @@ function $TemplateCacheProvider() {
7462
7462
*
7463
7463
* This example show how you might use `$doCheck` to trigger changes in your component's inputs even if the
7464
7464
* actual identity of the component doesn't change. (Be aware that cloning and deep equality checks on large
7465
- * arrays or objects can have a negative impact on your application performance)
7465
+ * arrays or objects can have a negative impact on your application performance. )
7466
7466
*
7467
7467
* <example name="doCheckArrayExample" module="do-check-module">
7468
7468
* <file name="index.html">
@@ -7785,7 +7785,7 @@ function $TemplateCacheProvider() {
7785
7785
* would result in the whole app "stalling" until all templates are loaded asynchronously - even in the
7786
7786
* case when only one deeply nested directive has `templateUrl`.
7787
7787
*
7788
- * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}
7788
+ * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}.
7789
7789
*
7790
7790
* You can specify `templateUrl` as a string representing the URL or as a function which takes two
7791
7791
* arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns
@@ -7846,7 +7846,7 @@ function $TemplateCacheProvider() {
7846
7846
* own templates or compile functions. Compiling these directives results in an infinite loop and
7847
7847
* stack overflow errors.
7848
7848
*
7849
- * This can be avoided by manually using $compile in the postLink function to imperatively compile
7849
+ * This can be avoided by manually using ` $compile` in the postLink function to imperatively compile
7850
7850
* a directive's template instead of relying on automatic template compilation via `template` or
7851
7851
* `templateUrl` declaration or manual compilation inside the compile function.
7852
7852
* </div>
@@ -7950,17 +7950,17 @@ function $TemplateCacheProvider() {
7950
7950
*
7951
7951
* * `true` - transclude the content (i.e. the child nodes) of the directive's element.
7952
7952
* * `'element'` - transclude the whole of the directive's element including any directives on this
7953
- * element that defined at a lower priority than this directive. When used, the `template`
7953
+ * element that are defined at a lower priority than this directive. When used, the `template`
7954
7954
* property is ignored.
7955
7955
* * **`{...}` (an object hash):** - map elements of the content onto transclusion "slots" in the template.
7956
7956
*
7957
- * **Mult -slot transclusion** is declared by providing an object for the `transclude` property.
7957
+ * **Multi -slot transclusion** is declared by providing an object for the `transclude` property.
7958
7958
*
7959
7959
* This object is a map where the keys are the name of the slot to fill and the value is an element selector
7960
7960
* used to match the HTML to the slot. The element selector should be in normalized form (e.g. `myElement`)
7961
7961
* and will match the standard element variants (e.g. `my-element`, `my:element`, `data-my-element`, etc).
7962
7962
*
7963
- * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}
7963
+ * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}.
7964
7964
*
7965
7965
* If the element selector is prefixed with a `?` then that slot is optional.
7966
7966
*
@@ -7985,7 +7985,7 @@ function $TemplateCacheProvider() {
7985
7985
* </div>
7986
7986
*
7987
7987
* If you want to manually control the insertion and removal of the transcluded content in your directive
7988
- * then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery
7988
+ * then you must use this transclude function. When you call a transclude function it returns a jqLite/JQuery
7989
7989
* object that contains the compiled DOM, which is linked to the correct transclusion scope.
7990
7990
*
7991
7991
* When you call a transclusion function you can pass in a **clone attach function**. This function accepts
@@ -8070,8 +8070,8 @@ function $TemplateCacheProvider() {
8070
8070
* The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the
8071
8071
* `link()` or `compile()` functions. It has a variety of uses.
8072
8072
*
8073
- * * *Accessing normalized attribute names:* Directives like ' ngBind' can be expressed in many ways:
8074
- * ' ng:bind' , `data-ng-bind`, or ' x-ng-bind' . The attributes object allows for normalized access
8073
+ * * *Accessing normalized attribute names:* Directives like ` ngBind` can be expressed in many ways:
8074
+ * ` ng:bind` , `data-ng-bind`, or ` x-ng-bind` . The attributes object allows for normalized access
8075
8075
* to the attributes.
8076
8076
*
8077
8077
* * *Directive inter-communication:* All directives share the same instance of the attributes
@@ -8112,25 +8112,24 @@ function $TemplateCacheProvider() {
8112
8112
<file name="index.html">
8113
8113
<script>
8114
8114
angular.module('compileExample', [], function($compileProvider) {
8115
- // configure new 'compile' directive by passing a directive
8116
- // factory function. The factory function injects the '$compile'
8115
+ // Configure new 'compile' directive by passing a directive
8116
+ // factory function. The factory function injects '$compile'.
8117
8117
$compileProvider.directive('compile', function($compile) {
8118
- // directive factory creates a link function
8118
+ // The directive factory creates a link function.
8119
8119
return function(scope, element, attrs) {
8120
8120
scope.$watch(
8121
8121
function(scope) {
8122
- // watch the 'compile' expression for changes
8122
+ // Watch the 'compile' expression for changes.
8123
8123
return scope.$eval(attrs.compile);
8124
8124
},
8125
8125
function(value) {
8126
- // when the 'compile' expression changes
8127
- // assign it into the current DOM
8126
+ // When the 'compile' expression changes
8127
+ // assign it into the current DOM.
8128
8128
element.html(value);
8129
8129
8130
- // compile the new DOM and link it to the current
8131
- // scope.
8132
- // NOTE: we only compile .childNodes so that
8133
- // we don't get into infinite loop compiling ourselves
8130
+ // Compile the new DOM and link it to the current scope.
8131
+ // NOTE: we only compile '.childNodes' so that we
8132
+ // don't get into an infinite loop compiling ourselves.
8134
8133
$compile(element.contents())(scope);
8135
8134
}
8136
8135
);
@@ -8203,35 +8202,37 @@ function $TemplateCacheProvider() {
8203
8202
* }
8204
8203
* ```
8205
8204
* * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add
8206
- * the cloned elements; only needed for transcludes that are allowed to contain non html
8207
- * elements (e.g. SVG elements). See also the directive.controller property.
8205
+ * the cloned elements; only needed for transcludes that are allowed to contain non HTML
8206
+ * elements (e.g. SVG elements). See also the ` directive.controller` property.
8208
8207
*
8209
8208
* Calling the linking function returns the element of the template. It is either the original
8210
8209
* element passed in, or the clone of the element if the `cloneAttachFn` is provided.
8211
8210
*
8212
- * After linking the view is not updated until after a call to $digest which typically is done by
8211
+ * After linking the view is not updated until after a call to ` $digest`, which typically is done by
8213
8212
* AngularJS automatically.
8214
8213
*
8215
8214
* If you need access to the bound view, there are two ways to do it:
8216
8215
*
8217
8216
* - If you are not asking the linking function to clone the template, create the DOM element(s)
8218
8217
* before you send them to the compiler and keep this reference around.
8219
8218
* ```js
8220
- * var element = $compile('<p>{{total}}</p>')(scope);
8219
+ * var element = angular.element('<p>{{total}}</p>');
8220
+ * $compile(element)(scope);
8221
8221
* ```
8222
8222
*
8223
8223
* - if on the other hand, you need the element to be cloned, the view reference from the original
8224
8224
* example would not point to the clone, but rather to the original template that was cloned. In
8225
- * this case, you can access the clone via the cloneAttachFn:
8225
+ * this case, you can access the clone either via the `cloneAttachFn` or the value returned by the
8226
+ * linking function:
8226
8227
* ```js
8227
- * var templateElement = angular.element('<p>{{total}}</p>'),
8228
- * scope = ....;
8229
- *
8228
+ * var templateElement = angular.element('<p>{{total}}</p>');
8230
8229
* var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {
8231
- * //attach the clone to DOM document at the right place
8230
+ * // Attach the clone to DOM document at the right place.
8232
8231
* });
8233
8232
*
8234
- * //now we have reference to the cloned DOM via `clonedElement`
8233
+ * // Now we have reference to the cloned DOM via `clonedElement`.
8234
+ * // NOTE: The `clonedElement` returned by the linking function is the same as the
8235
+ * // `clonedElement` passed to `cloneAttachFn`.
8235
8236
* ```
8236
8237
*
8237
8238
*
@@ -8757,9 +8758,9 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
8757
8758
* @description
8758
8759
* Register a new directive with the compiler.
8759
8760
*
8760
- * @param {string|Object} name Name of the directive in camel-case (i.e. <code> ngBind</code> which
8761
- * will match as <code> ng-bind</code> ), or an object map of directives where the keys are the
8762
- * names and the values are the factories.
8761
+ * @param {string|Object} name Name of the directive in camel-case (i.e. ` ngBind` which will match
8762
+ * as ` ng-bind` ), or an object map of directives where the keys are the names and the values
8763
+ * are the factories.
8763
8764
* @param {Function|Array} directiveFactory An injectable directive factory function. See the
8764
8765
* {@link guide/directive directive guide} and the {@link $compile compile API} for more info.
8765
8766
* @returns {ng.$compileProvider} Self for chaining.
0 commit comments