我想基于Angular 4中的布尔值显示或隐藏模板.下面是HTML和代码
---这是在Home.Component.HTML中
<ng-template [ngIf]="isSummaryViewVisbile" #pricebookView ></ng-template>
Run Code Online (Sandbox Code Playgroud)
----这是在HomeComponent中
isSummaryViewVisbile: boolean = true;
Run Code Online (Sandbox Code Playgroud)
上面的代码不起作用,它总是隐藏模板,虽然我指的是真的.
提前致谢.