Implementing angularjs
I have a situation where I have a table with two columns. The first column is linked to an array, while the second column contains a dropdown menu.
My goal is to display or hide 5-6 additional columns (containing text and dropdowns) based on the selection made in the dropdown of the second column.
I attempted the following code snippet:
<table class="table table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Value</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in items">
<td >{{item.name}}</td>
<td >
<select name="utype" class="form-control input-medium" ng-model="utype">
<option value="">---Please select---</option>
<option ng-repeat="type in types" >{{type.text}}</option>
</select></td>
<td><span ng-hide="utype =='Type1' || utype!=undefined" >{{item.value}}</span></td>
<td><button class="btn btn-small" ng-click="edit(item)">Edit</button></td>
</tr>
</tbody>
</table>
ng-hide="utype =='Type1' || utype!=undefined"
Unfortunately, this code only works correctly the first time. Subsequent attempts fail to hide the columns as intended.
If anyone could provide guidance on how to resolve this issue, I would greatly appreciate it.