WrappedValue
Indicates that the result of a Pipe
transformation has changed even though the
reference has not changed.
class WrappedValue {
static wrap(value: any): WrappedValue
static unwrap(value: any): any
static isWrapped(value: any): value is WrappedValue
constructor(value: any)
wrapped: any
}
Description
Wrapped values are unwrapped automatically during the change detection, and the unwrapped value is stored.
Example:
if (this._latestValue === this._latestReturnedValue) {
return this._latestReturnedValue;
} else {
this._latestReturnedValue = this._latestValue;
return WrappedValue.wrap(this._latestValue); // this will force update
}
Static methods
Creates a wrapped value. |
Returns the underlying value of a wrapped value.
Returns the given |
Returns true if |
|||
Parameters
Returns
|
Constructor
Properties
Property | Description |
---|---|
wrapped: any
|