
committed by
Misko Hevery

parent
64ad74acbe
commit
5c25248582
@ -32,6 +32,7 @@ export var defaultPipes = {
|
||||
"keyValDiff" : keyValDiff
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @exportedAs angular2/change_detection
|
||||
*/
|
||||
@ -66,4 +67,4 @@ export class JitChangeDetection extends ChangeDetection {
|
||||
}
|
||||
}
|
||||
|
||||
export var defaultPipeRegistry = new PipeRegistry(defaultPipes);
|
||||
export var defaultPipeRegistry = new PipeRegistry(defaultPipes);
|
||||
|
@ -4,7 +4,7 @@ import {CHECK_ONCE, DETACHED, CHECK_ALWAYS} from './constants';
|
||||
/**
|
||||
* Controls change detection.
|
||||
*
|
||||
* [ChangeDetectorRef] allows requesting checks for detectors that rely on observables. It also allows detaching and
|
||||
* {@link ChangeDetectorRef} allows requesting checks for detectors that rely on observables. It also allows detaching and
|
||||
* attaching change detector subtrees.
|
||||
*
|
||||
* @exportedAs angular2/change_detection
|
||||
@ -42,4 +42,4 @@ export class ChangeDetectorRef {
|
||||
this._cd.mode = CHECK_ALWAYS;
|
||||
this.requestCheck();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,17 +14,17 @@ export class ProtoChangeDetector {
|
||||
*
|
||||
* Angular implements the following change detection strategies by default:
|
||||
*
|
||||
* - [dynamicChangeDetection]: slower, but does not require `eval()`.
|
||||
* - [jitChangeDetection]: faster, but requires `eval()`.
|
||||
* - {@link DynamicChangeDetection}: slower, but does not require `eval()`.
|
||||
* - {@link JitChangeDetection}: faster, but requires `eval()`.
|
||||
*
|
||||
* In JavaScript, you should always use `jitChangeDetection`, unless you are in an environment that has
|
||||
* In JavaScript, you should always use `JitChangeDetection`, unless you are in an environment that has
|
||||
* [CSP](https://developer.mozilla.org/en-US/docs/Web/Security/CSP), such as a Chrome Extension.
|
||||
*
|
||||
* In Dart, use `dynamicChangeDetection` during development. The Angular transformer generates an analog to the
|
||||
* `jitChangeDetection` strategy at compile time.
|
||||
* In Dart, use `DynamicChangeDetection` during development. The Angular transformer generates an analog to the
|
||||
* `JitChangeDetection` strategy at compile time.
|
||||
*
|
||||
*
|
||||
* See: [dynamicChangeDetection], [jitChangeDetection]
|
||||
* See: {@link DynamicChangeDetection}, {@link JitChangeDetection}
|
||||
*
|
||||
* # Example
|
||||
* ```javascript
|
||||
|
@ -210,10 +210,10 @@ export class IterableChanges extends Pipe {
|
||||
/**
|
||||
* This is the core function which handles differences between collections.
|
||||
*
|
||||
* - [record] is the record which we saw at this position last time. If null then it is a new
|
||||
* - `record` is the record which we saw at this position last time. If null then it is a new
|
||||
* item.
|
||||
* - [item] is the current item in the collection
|
||||
* - [index] is the position of the item in the collection
|
||||
* - `item` is the current item in the collection
|
||||
* - `index` is the position of the item in the collection
|
||||
*/
|
||||
_mismatch(record:CollectionChangeRecord, item, index:int):CollectionChangeRecord {
|
||||
// The previous record after which we will append the current one.
|
||||
@ -284,9 +284,9 @@ export class IterableChanges extends Pipe {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get rid of any excess [CollectionChangeRecord]s from the previous collection
|
||||
* Get rid of any excess {@link CollectionChangeRecord}s from the previous collection
|
||||
*
|
||||
* - [record] The first excess [CollectionChangeRecord].
|
||||
* - `record` The first excess {@link CollectionChangeRecord}.
|
||||
*/
|
||||
_truncate(record:CollectionChangeRecord) {
|
||||
// Anything after that needs to be removed;
|
||||
@ -588,7 +588,7 @@ class _DuplicateItemRecordList {
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove one [CollectionChangeRecord] from the list of duplicates.
|
||||
* Remove one {@link CollectionChangeRecord} from the list of duplicates.
|
||||
*
|
||||
* Returns whether the list of duplicates is empty.
|
||||
*/
|
||||
@ -651,7 +651,7 @@ class _DuplicateMap {
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes an [CollectionChangeRecord] from the list of duplicates.
|
||||
* Removes a {@link CollectionChangeRecord} from the list of duplicates.
|
||||
*
|
||||
* The list of duplicates also is removed from the map if it gets empty.
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Indicates that the result of a [Pipe] transformation has not changed since the last time the pipe was called.
|
||||
* Indicates that the result of a {@link Pipe} transformation has not changed since the last time the pipe was called.
|
||||
*
|
||||
* Suppose we have a pipe that computes changes in an array by performing a simple diff operation. If
|
||||
* we call this pipe with the same array twice, it will return `NO_CHANGE` the second time.
|
||||
@ -12,7 +12,7 @@ export var NO_CHANGE = new Object();
|
||||
/**
|
||||
* An interface for extending the list of pipes known to Angular.
|
||||
*
|
||||
* If you are writing a custom [Pipe], you must extend this interface.
|
||||
* If you are writing a custom {@link Pipe}, you must extend this interface.
|
||||
*
|
||||
* #Example
|
||||
*
|
||||
|
Reference in New Issue
Block a user