Sajid Ahmad
Sajid Ahmad

Reputation: 1144

ng-show is not working in table while the same statement working in div body

I have two tables inside a div element. I want to hide both the tables when template loads. and want to show them based on conditions. for this i created two tables inside a div and placed ng-show attribute in both the tables. but tables are visible not hidden. My code is

if i place the same ng-show attribute in div it goes hidden , but table are not hidden. tell me what i am doing wrong here? help will be appreciable

<table ng-modal="deferredquiz" ng-show="showdeferredquizz" ng-true-value="true" ng-false-value="false" class="ng-hide">
    <tr>dddddddddddddddddddddd</tr>
        <tr data-ng-repeat="question in quizdata.questions">
            <td ng-switch="question.question_type">


                </td>               
        </tr>
        <tr>

        </tr>
    </table>

    <table ng-show="showimmediatequiz" ng-true-value="yes" ng-false-value="no">
        <tr>

        </tr>
        <tr>
            <td><button ng-click="submitDeferredQuiz()">Submit</button></td>
        </tr>
    </table>

Upvotes: 0

Views: 2467

Answers (1)

Darryl
Darryl

Reputation: 1451

You need to add in < td > tags within the < tr > tags.

Upvotes: 5

Related Questions