πŸ“Š Angular
Q. Which lifecycle hook is called when the component is created?
  • (A) ngOnInit
  • (B) ngAfterViewInit
  • (C) ngDoCheck
  • (D) ngOnDestroy
πŸ’¬ Discuss
βœ… Correct Answer: (A) ngOnInit

Explanation: ngOnInit is called once the component is initialized and is a good place for setup logic.

Explanation by: Mr. Dubey
ngOnInit is called once the component is initialized and is a good place for setup logic.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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