Q. What happens when you use *ngIf and *ngFor on the same element?

  • (A) Both directives work simultaneously
  • (B) Only *ngIf works
  • (C) Error occurs
  • (D) Angular merges both
πŸ’¬ Discuss
βœ… Correct Answer: (C) Error occurs
Explanation: Angular does not allow multiple structural directives on the same element directly.
Explanation by: Mr. Dubey
Angular does not allow multiple structural directives on the same element directly.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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