What is the main benefit of declaring an Angular component as standalone?
easy📝 Conceptual Q1 of 15
Angular - Standalone Components
What is the main benefit of declaring an Angular component as standalone?
AIt disables change detection for the component.
BIt automatically makes the component lazy-loaded.
CIt allows the component to be used without importing it into an NgModule.
DIt requires the component to be declared in multiple modules.
Step-by-Step Solution
Solution:
Step 1: Understand standalone component purpose
Standalone components are designed to work independently without needing to be declared inside an NgModule.
Step 2: Analyze options
It allows the component to be used without importing it into an NgModule correctly states this benefit. Automatic lazy-loading, disabling change detection, and requiring multiple module declarations describe unrelated or incorrect behaviors.
Final Answer:
It allows the component to be used without importing it into an NgModule. -> Option C
Quick Check:
Standalone component benefit = It allows the component to be used without importing it into an NgModule. [OK]
Quick Trick:Standalone means no NgModule needed to use component [OK]