我有以下title
,我希望show
element
if person == some value, e.g family
。如何使用expression
构建ngShow
?
<h2 class="mat-title" style="text-align:center;">Register as a {{person}}</h2>
答案 0 :(得分:2)
您可以使用ng-if
<h2 ng-if="person==='family'" class="mat-title" style="text-align:center;">Register as a {{person}}</h2>