Empty Text is not showing In table I am using table which is empty Now
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>ID</th>
<th>Privilege Name</th>
<th>PageUrl</th>
<th>Can Add</th>
<th>Can Edit</th>
<th>Can Delete</th>
<th>Can View</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="obj in getAssignedPrivilegeslist" ng-show="getAssignedPrivilegeslist.length !=0 && getAssignedPrivilegeslist !='null'">
<td>{{$index+1}}</td>
<td>{{obj.PageName}}</td>
<td><a ng-href="{{'//'+obj.PageUrl }}">{{obj.PageUrl}}</a></td>
<td>
<input type="checkbox" name="Add" value="Add" ng-model="obj.CanCreate" />
</td>
<td>
<input type="checkbox" name="Edit" value="Edit" ng-model="obj.CanEdit" />
</td>
<td>
<input type="checkbox" name="Delete" value="Delete" ng-model="obj.CanDelete" />
</td>
<td>
<input type="checkbox" name="View" value="View" ng-model="obj.CanView" />
</td>
<td ng-show="getAssignedPrivilegeslist.length==0" id="nofoundop">Please Select Operator</td>
</tr>
</tbody>
</table>
Then I set a <td> if data length is 0 then show the given message but it is not showing.
Please help I will be very thankful to you all.
ng-show="getAssignedPrivilegeslist.length !=0 && getAssignedPrivilegeslist !='null'"would be better written asng-show="getAssignedPrivilegeslist.length". If the list's length is any number besides 0, it'll evaluate as true, and if it's 0 or can't be accessed (because it's undefined), it'll evaluate as false. However, you'll run into problems if you're actually storing the string literal'null'as its value, so change that tonullinstead if you were.