Umesh  Kumar
What do you understand by pure and impure pipes in Angular?
By Umesh Kumar in Angular on Apr 22 2021
  • Pranam Bhat
    May, 2021 21

    A pure pipe is only called when Angular detects a change in the value or the parameters passed to a pipe.An impure pipe is called for every change detection cycle no matter whether the value or parameter(s) changes.This is relevant for changes that are not detected by Angularwhen you pass an array or object that got the content changed (but is still the same instance) when the pipe injects a service to get access to other values, Angular doesn't recognize if they have changed.

    • 0
  • Shubham Chaudhari
    Apr, 2021 28

    impure-pipe works for every change in the component
    pure-pipe works only when the component is loaded.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS