Q. How can you bind CSS classes conditionally in Angular?

  • (A) Using [class.className] binding
  • (B) Using ngClass directive
  • (C) Using [ngClass] directive with an object
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above
Explanation: All these methods allow conditional CSS class binding in templates.
Explanation by: Mr. Dubey
All these methods allow conditional CSS class binding in templates.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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