Angular - Performance OptimizationIf your Angular app's bundle remains large despite removing unused components, which issue might be blocking tree shaking?AEnabling Ahead-of-Time compilationBUsing Angular CLI for building the appCImporting entire libraries instead of specific modulesDUsing lazy loading for feature modulesCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify common tree shaking blockersImporting entire libraries prevents removal of unused code.Step 2: Understand other optionsAngular CLI, AOT, and lazy loading help reduce bundle size, not block tree shaking.Final Answer:Importing entire libraries instead of specific modules -> Option CQuick Check:Whole-library imports block tree shaking [OK]Quick Trick: Avoid full library imports to enable tree shaking [OK]Common Mistakes:Blaming Angular CLI or AOT for bundle sizeIgnoring import stylesAssuming lazy loading increases bundle size
Master "Performance Optimization" in Angular9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallPerf
More Angular Quizzes Advanced Patterns - Facade service pattern - Quiz 9hard Angular Signals - Effect for side effects - Quiz 1easy Angular Signals - Why signals are introduced - Quiz 3easy Internationalization and Accessibility - Locale switching - Quiz 2easy Performance Optimization - Lazy loading routes and modules - Quiz 15hard Server-Side Rendering - Pre-rendering static pages - Quiz 15hard Standalone Components - Bootstrapping with standalone - Quiz 14medium State Management - Why state management matters - Quiz 6medium State Management - Service-based state management - Quiz 13medium Testing - Testing with fixtures and debug elements - Quiz 6medium