1. <p *ngIf="heroes.length > 3">There are many heroes!</p>
    1. //我们也可以通过类绑定或样式绑定来显示或隐藏一个元素。
    2. // isSpecial = true
    3. <div [class.hidden]="!isSpecial">Show with class</div>
    4. <div [class.hidden]="isSpecial">Hide with class</div>
    5. <div [style.display]="isSpecial ? 'block' : 'none'">Show with style</div>
    6. <div [style.display]="isSpecial ? 'none' : 'block'">Hide with style</div>//我们也可以通过类绑定或样式绑定来显示或隐藏一个元素。
    7. // isSpecial = true
    8. <div [class.hidden]="!isSpecial">Show with class</div>
    9. <div [class.hidden]="isSpecial">Hide with class</div>
    10. <div [style.display]="isSpecial ? 'block' : 'none'">Show with style</div>
    11. <div [style.display]="isSpecial ? 'none' : 'block'">Hide with style</div>