Q. What is the purpose of `@ViewChild()`?

  • (A) To access a child component or DOM element
  • (B) To emit data to the parent
  • (C) To create HTTP clients
  • (D) To enable two-way binding
πŸ’¬ Discuss
βœ… Correct Answer: (A) To access a child component or DOM element
Explanation: `@ViewChild()` allows a component to access an element or directive in its template.
Explanation by: Mr. Dubey
`@ViewChild()` allows a component to access an element or directive in its template.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
73
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
87%
Success Rate