Used by Angular 1 directive. For Angular 2, use *ngIf
for components that should not be in the DOM when they are hidden or tied to the hidden HTML property [hidden]
, if you want the component to always be in the DOM but hiding from CSS.
eg:
<div *ngIf="newTrustFormVisible" class="panel panel-default">
or
<div [hidden]="!newTrustFormVisible" class="panel panel-default">
Angular 1 to Angular 2 links
* ngIf
source share