Angular - Advanced PatternsWhich Angular decorator is used to create a custom structural directive?A@ComponentB@PipeC@InjectableD@DirectiveCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify the decorator for directivesAngular uses @Directive to define both attribute and structural directives.Step 2: Exclude other decorators@Component is for components, @Injectable for services, and @Pipe for pipes, so they are not correct here.Final Answer:@Directive -> Option DQuick Check:Custom structural directive decorator = @Directive [OK]Quick Trick: Use @Directive to create any directive, including structural [OK]Common Mistakes:Using @Component instead of @DirectiveConfusing with @Injectable or @PipeNot adding the selector property
Master "Advanced Patterns" in Angular9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallPerf
More Angular Quizzes Angular Signals - Signal creation and reading - Quiz 4medium Animations - Keyframe animations - Quiz 2easy Internationalization and Accessibility - ARIA attributes in templates - Quiz 11easy Internationalization and Accessibility - Angular i18n built-in support - Quiz 4medium Performance Optimization - Virtual scrolling for large lists - Quiz 6medium Standalone Components - Standalone pipes and directives - Quiz 2easy State Management - Effects for side effects - Quiz 5medium Testing - Testing HTTP calls with HttpTestingController - Quiz 8hard Testing - TestBed configuration - Quiz 3easy Testing - TestBed configuration - Quiz 8hard