Bird
0
0

You have an Angular pipe declared as pure: false but it does not update when input changes. What is a likely cause?

medium📝 Debug Q6 of 15
Angular - Pipes
You have an Angular pipe declared as pure: false but it does not update when input changes. What is a likely cause?
AThe pipe is not listed in declarations array.
BThe input reference never changes and pipe relies on reference check.
CThe pipe is missing the transform method.
DThe pipe is declared as pure: true by mistake.
Step-by-Step Solution
Solution:
  1. Step 1: Understand impure pipe behavior

    Impure pipes run every cycle, so input reference changes are not required.
  2. Step 2: Analyze why pipe might not update

    If pipe relies on reference but input never changes, output may appear stale despite impure setting.
  3. Final Answer:

    The input reference never changes and pipe relies on reference check. -> Option B
  4. Quick Check:

    Impure pipes update every cycle, but input reference matters for output [OK]
Quick Trick: Impure pipes run every cycle but input changes affect output [OK]
Common Mistakes:
  • Assuming pure: false always forces update regardless of input
  • Forgetting to declare pipe in module declarations
  • Confusing missing transform method with update issues

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes