Skip to content

Commit 1009e24

Browse files
author
Your Name
committed
Angular Material In Depth
1 parent d87dc82 commit 1009e24

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/app/app.component.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
<span>Tree Demo</span>
2626
</a>
2727

28+
<a mat-list-item routerLink="virtual-scrolling">
29+
<mat-icon>import_export</mat-icon>
30+
<span>Virtual Scrolling</span>
31+
</a>
32+
2833
<a mat-list-item>
2934
<mat-icon>person_add</mat-icon>
3035
<span>Register</span>

src/app/virtual-scrolling/virtual-scrolling.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
.scrolling-container {
1111
display: block;
1212
width: 200px;
13-
max-height: 200px;
13+
height: 200px;
1414
overflow-y: scroll;
1515
}

src/app/virtual-scrolling/virtual-scrolling.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {Component, OnInit} from '@angular/core';
88
})
99
export class VirtualScrollingComponent implements OnInit {
1010

11-
items = Array.from({length: 100}).map((value, i) => `Item #${i}`);
11+
items = Array.from({length: 20000}).map((value, i) => `Item #${i}`);
1212

1313
ngOnInit() {
1414

0 commit comments

Comments
 (0)