πŸ“Š Angular
Q. What does `ngOnInit` lifecycle hook do?
  • (A) Initializes the component after Angular sets the data-bound properties
  • (B) Destroys the component
  • (C) Creates the component
  • (D) Validates the form
πŸ’¬ Discuss
βœ… Correct Answer: (A) Initializes the component after Angular sets the data-bound properties

Explanation: `ngOnInit` is called once, after the first `ngOnChanges`, and is used to initialize the component.

Explanation by: Mr. Dubey
`ngOnInit` is called once, after the first `ngOnChanges`, and is used to initialize the component.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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