πŸ“Š Angular
Q. What is the purpose of the ngOnInit lifecycle hook?
  • (A) To perform component initialization logic after Angular has set inputs
  • (B) To destroy the component
  • (C) To handle change detection
  • (D) To handle user events
πŸ’¬ Discuss
βœ… Correct Answer: (A) To perform component initialization logic after Angular has set inputs

Explanation: ngOnInit is called once after the first ngOnChanges.

Explanation by: Mr. Dubey
ngOnInit is called once after the first ngOnChanges.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
44
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
94%
Success Rate