Angular - PipesYou have a custom pipe marked as pure, but it still recalculates on every change detection. What is the most likely cause?AThe pipe input is a new object or array instance each time.BThe pipe is missing the @Pipe decorator.CAngular does not support pure pipes.DThe pipe class is not exported.Check Answer
Step-by-Step SolutionSolution:Step 1: Recall pure pipe trigger conditionPure pipes run only when their input reference changes.Step 2: Identify cause of repeated recalculationIf the input is a new object or array instance each time, the reference changes, triggering the pipe.Final Answer:The pipe input is a new object or array instance each time. -> Option AQuick Check:New input reference triggers pure pipe [OK]Quick Trick: Check if input object/array is recreated each time [OK]Common Mistakes:Assuming pure pipes run without input changesThinking missing decorator causes recalculationBelieving Angular lacks pure pipe support
Master "Pipes" in Angular9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallPerf
More Angular Quizzes Angular Fundamentals - Angular project structure walkthrough - Quiz 3easy Angular Modules - Shared modules for reusable components - Quiz 7medium Components - Component template basics - Quiz 8hard Components - Component selector usage - Quiz 1easy Lifecycle Hooks - ngDoCheck for custom change detection - Quiz 13medium Pipes - Creating custom pipes - Quiz 15hard Templates and Data Binding - Event binding with parentheses - Quiz 15hard TypeScript in Angular - Decorators as TypeScript feature - Quiz 5medium TypeScript in Angular - Interfaces for data models - Quiz 11easy TypeScript in Angular - Type annotations in components - Quiz 8hard