Different between pure and impure pipe in angular?
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit MohantyRank #112 · 20K reputationPosted Nov 21, 2022, 12:11 AM EST
Check the links
https://medium.com/@ghoul.ahmed5/pure-vs-impure-pipe-in-angular-2152cf073e4d
https://www.geeksforgeeks.org/explain-pure-and-impure-pipe-in-angular/
Vishal JoshiRank #377 · 6.7K reputationPosted Nov 21, 2022, 1:10 AM EST
Hello,
Please find below the interview question link for the same.
Pure & Impure Pipes
https://www.c-sharpcorner.com/interview-question/what-are-pure-and-impure-pipes-in-angular
Thanks
Vishal YelveRank #178 · 13.6K reputationPosted Nov 21, 2022, 4:57 AM EST
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 Angular when 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.
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Nov 22, 2022, 1:21 AM EST
https://www.c-sharpcorner.com/forums/what-is-difference-between-pure-and-impure-pipe-in-angular