Skip to content

Commit

Permalink
docs(#1229): fix search function in server side
Browse files Browse the repository at this point in the history
  • Loading branch information
l-lin committed Aug 25, 2018
1 parent c28b4c6 commit b6dd230
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
18 changes: 10 additions & 8 deletions demo/src/app/basic/server-side-angular-way-snippet.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ export class ServerSideAngularWaySnippetComponent {
<th>Last name</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let person of persons">
<td>{{ person.id }}</td>
<td>{{ person.firstName }}</td>
<td>{{ person.lastName }}</td>
</tr>
<tr *ngIf="persons?.length == 0">
<tbody *ngIf="persons?.length != 0">
<tr *ngFor="let person of persons">
<td>{{ person.id }}</td>
<td>{{ person.firstName }}</td>
<td>{{ person.lastName }}</td>
</tr>
</tbody>
<tbody *ngIf="persons?.length == 0">
<tr>
<td colspan="3" class="no-data-available">No data!</td>
</tr>
</tbody>
<tbody>
&lt;/table&gt;</code>
</pre>
`;
Expand Down
12 changes: 7 additions & 5 deletions demo/src/app/basic/server-side-angular-way.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,22 @@ <h4 class="header">Preview</h4>
<th>Last name</th>
</tr>
</thead>
<tbody>
<tbody *ngIf="persons?.length != 0">
<tr *ngFor="let person of persons">
<td>{{ person.id }}</td>
<td>{{ person.firstName }}</td>
<td>{{ person.lastName }}</td>
</tr>
<tr *ngIf="persons?.length == 0">
<td colspan="3" class="no-data-available">No data!</td>
</tr>
</tbody>
<tbody *ngIf="persons?.length == 0">
<tr>
<td colspan="3" class="no-data-available">No data!</td>
</tr>
</tbody>
</table>
<app-server-side-angular-way-snippet></app-server-side-angular-way-snippet>
</div>
</div>
</div>
</div>
</div>
</div>

0 comments on commit b6dd230

Please sign in to comment.