WrappedValue

class

npm Package @angular/core
Module import { WrappedValue } from '@angular/core';
Source core/src/change_detection/change_detection_util.ts

Overview

class WrappedValue {
  constructor(wrapped: any)
  static wrap(value: any): WrappedValue
  wrapped: any
}

Description

Indicates that the result of a Pipe transformation has changed even though the reference has not changed.

The wrapped value will be unwrapped by change detection, and the unwrapped value will be 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 Members

static wrap(value: any): WrappedValue

Constructor

constructor(wrapped: any)

Members

wrapped: any

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v4.angular.io/api/core/WrappedValue