Angular - PipesYou 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.Check Answer
Step-by-Step SolutionSolution:Step 1: Understand impure pipe behaviorImpure pipes run every cycle, so input reference changes are not required.Step 2: Analyze why pipe might not updateIf pipe relies on reference but input never changes, output may appear stale despite impure setting.Final Answer:The input reference never changes and pipe relies on reference check. -> Option BQuick 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 inputForgetting to declare pipe in module declarationsConfusing missing transform method with update issues
Master "Pipes" in Angular9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallPerf
More Angular Quizzes Angular Fundamentals - Angular CLI installation and setup - Quiz 15hard Angular Fundamentals - Why Angular for enterprise applications - Quiz 14medium Angular Fundamentals - What is Angular - Quiz 13medium Angular Fundamentals - How Angular bootstraps an application - Quiz 5medium Angular Fundamentals - How Angular bootstraps an application - Quiz 7medium Component Interaction - @Input decorator for parent to child - Quiz 2easy Lifecycle Hooks - ngAfterContentInit for projected content - Quiz 15hard Lifecycle Hooks - ngDoCheck for custom change detection - Quiz 10hard Templates and Data Binding - Why data binding matters - Quiz 11easy TypeScript in Angular - Interfaces for data models - Quiz 7medium