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
  • 203,447
  • 57
  • 330
  • 376
CodeHip
  • 357
  • 4
  • 17

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
  • 203,447
  • 57
  • 330
  • 376