have have built a table with multiple column and rows for certain items to 
appear or if not needed I wanted to hid them.

I have a row with 8 columns, each column holds a Poker Chip of a certain 
color, if you don't have that color, I have the user uncheck the box and 
the <td> will disappear. 

i am working with some sample code to help understand the concept.  Below 
is just the sample code I found and thought it would work.  Not sure if 
there is a limitation on how many times you can use the name ng-model, but 
as you can see the bolded items.  I'm hoping to be able to place my check 
box on one row and the Poker chip in the row above.  I also have some 
additional text that will fill the chip with amount.  I have not listed 
that code because it's so confusing so I'm hoping to illustrate what i'm 
trying to accomplish with the practice code below.  Currently only the 
first "ShowText" will hide, not the second.  Is there a limitation of how 
many iterations you can use the ng-model on?

<body ng-app="NgHideShowApp">
    <div ng-controller="AppCtrl">
        <div>
            <input type="checkbox" ng-model="showText">Change Text
            <br>
            

*<div ng-show="showText">                Displaying the div            
</div>*
        </div>
        <br><br>
       
        <br><br>
        <div>
            <button ng-click="toggleColor()">Toggle Color</button>
            <div ng-show="showColor()" style="font-size:40px; 
color:#dd1515;">AngularJS</div>
            <div ng-hide="showColor()" style="font-size:40px; 
color:#2f2f2f;">AngularJS</div>
        </div>
    </div>
    <div ng-controller="AppCtrl">
        

*<div ng-show="showText">            Displaying the div        </div> *
    </div>
        <script type="text/javascript" src="angular.js"></script>
        <script type="text/javascript" src="showhide.js"></script>
</body>


.js

'use strict';

angular.module('NgHideShowApp', [])
.controller('AppCtrl', ['$scope', function ($scope) {
    $scope.showText = true;

    }
}]);


Thank you for any help/advise.  I'm sure I'll be posting many more 
questions.  I am going to my first Angular user group on Tuesday, so 
hopefully I'll be able to find a local contact.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to