Javascript 如何在AngularJS代码中隐藏角度分量

Javascript 如何在AngularJS代码中隐藏角度分量,javascript,angularjs,angular,Javascript,Angularjs,Angular,我使用AngularJS代码渲染了MyTableComponentAngularComponent: // AngularJS code // src/template/expanded-table.html ... <div class="table-view-port"> <my-table ng-show="false" [model]="tableModel"

我使用AngularJS代码渲染了
MyTableComponent
AngularComponent:

// AngularJS code
// src/template/expanded-table.html
   ...
   <div class="table-view-port">
      <my-table ng-show="false" [model]="tableModel"
                                [dataSource]="data">
      </my-table>
   </div>
   ...
我所需要做的就是根本不渲染我的表。我尝试使用
ng show=“false”
来实现这一点,但它不起作用。我也尝试了
*ngIf=“false”
,但结果相同

我的降级模块,如果它能以某种方式影响:

// appModule/app.module.downgrade.ts 

const APP_MODULE_DOWNGRADABLES: Mapper[] = [
    ...
    {
        downgradeAs: 'directive',
        entity: {
            component: MyTableComponent
        },
        targetName: 'myTable'
    },
    ...

ng show是一个angularJs指令,它呈现一个html元素,然后隐藏它,如果条件不是故意的,*ngIf是一个angularJs指令,如果您不想呈现该元素,您应该使用
ng if=“false”
,这是正确的angularJs语法

// appModule/app.module.downgrade.ts 

const APP_MODULE_DOWNGRADABLES: Mapper[] = [
    ...
    {
        downgradeAs: 'directive',
        entity: {
            component: MyTableComponent
        },
        targetName: 'myTable'
    },
    ...