mercredi 25 mars 2015

Attempt to apply to the table in in the ng-click


Here is the HTML organized as follows.



<tr ng-style="{height : hideTagContainer? '38px': '140px'}">
<td><img src="../assets/images/icon_condition_coment.png"></td>
<td>2014.01.06 16:05</td>
<td>Subject</td>
<td>Message
<div class=“comment-container" ng-show="hideButton">
<div class=“coment-list" ng-show="modal">
<span class="list-image"><img src="../assets/images/icon_condition_coment.png" style="top:7px;"></span>
<span class="list-name”>comment-name</span>
<span class="list-time">2014.01.05 13:00</span>
<span class="list-message”>reply-messsage</span>
</div>
<textarea class=“reply-comment" ng-show="clicked[$index]”>OK, I got it</textarea><br/>
<span class=“reply-submit" ng-show="clicked[$index]" ng-click="itemIsClicked($index)"></span>
</div>
</td>
<td>
<span class="head-logo" ng-click="hideTagContainer(0)" ng-class="{'head-logo': hideButton ,'head-logo folded': !hideButton}"></span>
<input type="button" class="comment" value=“OK" ng-click="popupDelete()"></td>
</tr>
<tr ng-style="{height : hideTagContainer? '38px': '140px'}">
<td><img src="../assets/images/icon_condition_coment.png"></td>
<td>2014.01.06 17:05</td>
<td>Subject2</td>
<td>Message2
<div class=“comment-container" ng-show="hideButton">
<div class=“coment-list" ng-show="modal">
<span class="list-image"><img src="../assets/images/icon_condition_coment.png" style="top:7px;"></span>
<span class="list-name”>comment-name2</span>
<span class="list-time">2014.01.05 14:00</span>
<span class="list-message”>reply-messsage2</span>
</div>
<textarea class=“reply-comment" ng-show="clicked[$index]”>OK, I got it</textarea><br/>
<span class=“reply-submit" ng-show="clicked[$index]" ng-click="itemIsClicked($index)"></span>
</div>
</td>
<td>
<span class="head-logo" ng-click="hideTagContainer(1)" ng-class="{'head-logo': hideButton ,'head-logo folded': !hideButton}"></span>
<input type="button" class="comment" value=“OK" ng-click="popupDelete()"></td>
</tr>


I'm trying to change the style of each of tr through hideTagContainer (index).


HideTagcontainer of JS is coded as follows:



scope.hideButton = false;

scope.hideTagContainer = function (index) {
scope.hideButton = !scope.hideButton;
};


How Will To run the hidetagcontainer in each ?





Aucun commentaire:

Enregistrer un commentaire