使用ng-zorro时如何隐藏组件?

How can I hide component when I use ng-zorro?

我用的是Angular7和ng-zorro,我想在点击登录按钮的时候隐藏侧边栏。

我试过这个"[(nzVisible)]="isVisible"。但它不起作用。

Uncaught Error: Template parse errors: Can't bind to 'nzVisible' since it isn't a known property of 'div'.enter code here

只需添加*ngIf="condition"

工作示例ng-zorro-antd-start

    <button nz-button *ngIf="false" nzType="primary" >Primary</button>
        <---hides component
    <button nz-button nzType="primary" >Primary</button>