Pipes by default are "Pure" – they can’t detect changes when a value of the primitive type or the reference of the complex type changes. Example: when an array gets a new value inserted but the Pipe applied on that array during view binding can’t detect its change.
To Solve this, we can mark the pipe as "Impure" – which forces the Pipe to detect change and update the view each time the dataset changes.
<span>{{ myData | doPipe }}</span>
@Pipe({name:'doPipe', pure: false})
export class DoPipe implements PipeTransform {
/// pipe code
}