在点击时隐藏带有ng-hide的表格?

时间:2014-09-22 10:30:58

标签: javascript html angularjs

这是我的HTML:

 <tr ng-repeat-end ng-show="modelRow.activeRow==car.name" class="hidden-table">
    <td colspan="6">
        <table class="table table-striped table-bordered table-condensed table-hover">
            <thead>
                <tr>
                    <th>Year</th>
                    <th>Reviews</th>

如你所见,我有ng-show="modelRow.activeRow==car.name"。我也有导航标签,当我点击另一个标签时,表格仍然显示。 那么如何在{@ 1}}上隐藏某个按钮?

1 个答案:

答案 0 :(得分:1)

在按钮上单击设置一些标志,将hide_table设置为1。然后在表格标签中使用ng-show

检查hide_table标记值