Michael
Michael

Reputation: 16142

Hide table with ng-hide on click?

Here is my 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>

As you can see I have ng-show="modelRow.activeRow==car.name". I also have nav-tabs and when I click on another tab the table is still showing up. So how can I hide my table with ng-click on some button?

Upvotes: 0

Views: 71

Answers (1)

nirajkumar
nirajkumar

Reputation: 330

on button click set some flag say hide_table to 1 . And then in table tag check for hide_table tag value using ng-show

Upvotes: 1

Related Questions