Back to Quiz Results
Attempt Review
Adjust Score
Q1
Which lifecycle hook runs once, right after the first ngOnChanges?
Correct10 / 10 marks
Explanation
Time spent 1 min 48 sec
ngOnInit is called once after Angular sets the component's input properties for the first time.
Q2
Which decorator lets a parent component pass data into a child component?
Correct10 / 10 marks
Explanation
Time spent 1 min 12 sec
@Input() marks a property as bindable from the parent template, for example [title]="courseTitle".
Q3
What does the async pipe do in a template?
Incorrect0 / 10 marks
Explanation
Time spent 3 min 06 sec
The async pipe subscribes to an Observable or Promise, returns the latest emitted value and unsubscribes automatically when the component is destroyed.
Q4
Which structural directive conditionally adds an element to the DOM?
Correct10 / 10 marks
Explanation
Time spent 2 min 36 sec
*ngIf creates or removes the element from the DOM, while [hidden] only toggles its visibility.







