1442 Crosswind Drive Madisonville

+1 45887 77874

img

Eugene Andre

Instructor

Back to Quiz Results

Attempt Review

Adjust Score
Thompson Hicks
Attempt by

Thompson Hicks

Angular Components Quiz - Learn Angular Fundamentals Beginners Guide

Passed Attempt 2 of 3
Finished On22 Aug 2025, 09:00 AM
Time Taken8 min 42 sec
Time Limit15 min
Pass Mark60% (24 / 40)
Q1

Which lifecycle hook runs once, right after the first ngOnChanges?

Correct10 / 10 marks
  • ngOnInit Student's answer
  • ngAfterViewInit
  • ngDoCheck
  • ngOnDestroy
Explanation

ngOnInit is called once after Angular sets the component's input properties for the first time.

Time spent 1 min 48 sec
Q2

Which decorator lets a parent component pass data into a child component?

Correct10 / 10 marks
  • @Output()
  • @Input() Student's answer
  • @ViewChild()
  • @HostBinding()
Explanation

@Input() marks a property as bindable from the parent template, for example [title]="courseTitle".

Time spent 1 min 12 sec
Q3

What does the async pipe do in a template?

Incorrect0 / 10 marks
  • Formats a date value Student's answer
  • Subscribes to an Observable and returns its latest value Correct answer
  • Delays rendering by one change detection cycle
  • Converts a Promise into a string
Explanation

The async pipe subscribes to an Observable or Promise, returns the latest emitted value and unsubscribes automatically when the component is destroyed.

Time spent 3 min 06 sec
Q4

Which structural directive conditionally adds an element to the DOM?

Correct10 / 10 marks
  • *ngFor
  • *ngIf Student's answer
  • [ngClass]
  • [hidden]
Explanation

*ngIf creates or removes the element from the DOM, while [hidden] only toggles its visibility.

Time spent 2 min 36 sec
Final Score 30 / 40
B 75% - Good
  • Correct3 questions
  • Incorrect1 question
  • Skipped0 questions
  • Attempts used2 of 3

Question Navigator

1 2 3 4
Correct Incorrect

Attempt History

  • Attempt 115 Aug 2025
    55%Failed
  • Attempt 2 (viewing)22 Aug 2025
    75%Passed
  • Attempt 3Not taken
    -Available