0

I have the following title, and I want to show an element if person == some value, e.g family. How can I build that expression with ngShow?

<h2 class="mat-title" style="text-align:center;">Register as a {{person}}</h2>

Sajeetharan
  • 216,225
  • 63
  • 350
  • 396
CodeHip
  • 367
  • 5
  • 18

1 Answers1

2

You can use ng-if

<h2 ng-if="person==='family'" class="mat-title" style="text-align:center;">Register as a {{person}}</h2>
Sajeetharan
  • 216,225
  • 63
  • 350
  • 396