Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 84a5b81

Browse files
v1.7.9
1 parent 8721679 commit 84a5b81

File tree

3 files changed

+36
-35
lines changed

3 files changed

+36
-35
lines changed

angular.js

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2811,7 +2811,7 @@ var version = {
28112811
major: 1,
28122812
minor: 7,
28132813
dot: 9,
2814-
codeName: 'indeterminate-frosting'
2814+
codeName: 'pollution-eradication'
28152815
};
28162816

28172817

@@ -7462,7 +7462,7 @@ function $TemplateCacheProvider() {
74627462
*
74637463
* This example show how you might use `$doCheck` to trigger changes in your component's inputs even if the
74647464
* 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.)
74667466
*
74677467
* <example name="doCheckArrayExample" module="do-check-module">
74687468
* <file name="index.html">
@@ -7785,7 +7785,7 @@ function $TemplateCacheProvider() {
77857785
* would result in the whole app "stalling" until all templates are loaded asynchronously - even in the
77867786
* case when only one deeply nested directive has `templateUrl`.
77877787
*
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}.
77897789
*
77907790
* You can specify `templateUrl` as a string representing the URL or as a function which takes two
77917791
* arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns
@@ -7846,7 +7846,7 @@ function $TemplateCacheProvider() {
78467846
* own templates or compile functions. Compiling these directives results in an infinite loop and
78477847
* stack overflow errors.
78487848
*
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
78507850
* a directive's template instead of relying on automatic template compilation via `template` or
78517851
* `templateUrl` declaration or manual compilation inside the compile function.
78527852
* </div>
@@ -7950,17 +7950,17 @@ function $TemplateCacheProvider() {
79507950
*
79517951
* * `true` - transclude the content (i.e. the child nodes) of the directive's element.
79527952
* * `'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`
79547954
* property is ignored.
79557955
* * **`{...}` (an object hash):** - map elements of the content onto transclusion "slots" in the template.
79567956
*
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.
79587958
*
79597959
* This object is a map where the keys are the name of the slot to fill and the value is an element selector
79607960
* used to match the HTML to the slot. The element selector should be in normalized form (e.g. `myElement`)
79617961
* and will match the standard element variants (e.g. `my-element`, `my:element`, `data-my-element`, etc).
79627962
*
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}.
79647964
*
79657965
* If the element selector is prefixed with a `?` then that slot is optional.
79667966
*
@@ -7985,7 +7985,7 @@ function $TemplateCacheProvider() {
79857985
* </div>
79867986
*
79877987
* 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
79897989
* object that contains the compiled DOM, which is linked to the correct transclusion scope.
79907990
*
79917991
* When you call a transclusion function you can pass in a **clone attach function**. This function accepts
@@ -8070,8 +8070,8 @@ function $TemplateCacheProvider() {
80708070
* The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the
80718071
* `link()` or `compile()` functions. It has a variety of uses.
80728072
*
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
80758075
* to the attributes.
80768076
*
80778077
* * *Directive inter-communication:* All directives share the same instance of the attributes
@@ -8112,25 +8112,24 @@ function $TemplateCacheProvider() {
81128112
<file name="index.html">
81138113
<script>
81148114
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'.
81178117
$compileProvider.directive('compile', function($compile) {
8118-
// directive factory creates a link function
8118+
// The directive factory creates a link function.
81198119
return function(scope, element, attrs) {
81208120
scope.$watch(
81218121
function(scope) {
8122-
// watch the 'compile' expression for changes
8122+
// Watch the 'compile' expression for changes.
81238123
return scope.$eval(attrs.compile);
81248124
},
81258125
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.
81288128
element.html(value);
81298129

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.
81348133
$compile(element.contents())(scope);
81358134
}
81368135
);
@@ -8203,35 +8202,37 @@ function $TemplateCacheProvider() {
82038202
* }
82048203
* ```
82058204
* * `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.
82088207
*
82098208
* Calling the linking function returns the element of the template. It is either the original
82108209
* element passed in, or the clone of the element if the `cloneAttachFn` is provided.
82118210
*
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
82138212
* AngularJS automatically.
82148213
*
82158214
* If you need access to the bound view, there are two ways to do it:
82168215
*
82178216
* - If you are not asking the linking function to clone the template, create the DOM element(s)
82188217
* before you send them to the compiler and keep this reference around.
82198218
* ```js
8220-
* var element = $compile('<p>{{total}}</p>')(scope);
8219+
* var element = angular.element('<p>{{total}}</p>');
8220+
* $compile(element)(scope);
82218221
* ```
82228222
*
82238223
* - if on the other hand, you need the element to be cloned, the view reference from the original
82248224
* 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:
82268227
* ```js
8227-
* var templateElement = angular.element('<p>{{total}}</p>'),
8228-
* scope = ....;
8229-
*
8228+
* var templateElement = angular.element('<p>{{total}}</p>');
82308229
* 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.
82328231
* });
82338232
*
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`.
82358236
* ```
82368237
*
82378238
*
@@ -8757,9 +8758,9 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
87578758
* @description
87588759
* Register a new directive with the compiler.
87598760
*
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.
87638764
* @param {Function|Array} directiveFactory An injectable directive factory function. See the
87648765
* {@link guide/directive directive guide} and the {@link $compile compile API} for more info.
87658766
* @returns {ng.$compileProvider} Self for chaining.

angular.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

angular.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)