This repository was archived by the owner on Feb 2, 2025. It is now read-only.
File tree 2 files changed +17
-13
lines changed
2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,18 @@ export class ServerSideAngularWaySnippetComponent {
28
28
<th>Last name</th>
29
29
</tr>
30
30
</thead>
31
- <tbody>
32
- <tr *ngFor="let person of persons">
33
- <td>{{ person.id }}</td>
34
- <td>{{ person.firstName }}</td>
35
- <td>{{ person.lastName }}</td>
36
- </tr>
37
- <tr *ngIf="persons?.length == 0">
31
+ <tbody *ngIf="persons?.length != 0">
32
+ <tr *ngFor="let person of persons">
33
+ <td>{{ person.id }}</td>
34
+ <td>{{ person.firstName }}</td>
35
+ <td>{{ person.lastName }}</td>
36
+ </tr>
37
+ </tbody>
38
+ <tbody *ngIf="persons?.length == 0">
39
+ <tr>
38
40
<td colspan="3" class="no-data-available">No data!</td>
39
41
</tr>
40
- </ tbody>
42
+ <tbody>
41
43
</table></code>
42
44
</pre>
43
45
` ;
Original file line number Diff line number Diff line change @@ -38,20 +38,22 @@ <h4 class="header">Preview</h4>
38
38
< th > Last name</ th >
39
39
</ tr >
40
40
</ thead >
41
- < tbody >
41
+ < tbody *ngIf =" persons?.length != 0 " >
42
42
< tr *ngFor ="let person of persons ">
43
43
< td > {{ person.id }}</ td >
44
44
< td > {{ person.firstName }}</ td >
45
45
< td > {{ person.lastName }}</ td >
46
46
</ tr >
47
- < tr *ngIf ="persons?.length == 0 ">
48
- < td colspan ="3 " class ="no-data-available "> No data!</ td >
49
- </ tr >
47
+ </ tbody >
48
+ < tbody *ngIf ="persons?.length == 0 ">
49
+ < tr >
50
+ < td colspan ="3 " class ="no-data-available "> No data!</ td >
51
+ </ tr >
50
52
</ tbody >
51
53
</ table >
52
54
< app-server-side-angular-way-snippet > </ app-server-side-angular-way-snippet >
53
55
</ div >
54
56
</ div >
55
57
</ div >
56
58
</ div >
57
- </ div >
59
+ </ div >
You can’t perform that action at this time.
0 commit comments