Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f93ff09

Browse files
committed
docs(template): fix usage of fixed size
1 parent a8a0537 commit f93ff09

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

apps/docs/docs/template/api/virtual-scrolling.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ export class MyComponent {}
5151
```
5252

5353
```html
54-
<rx-virtual-scroll-viewport>
55-
<div [itemSize]="50" *rxVirtualFor="let hero of heroes$;">
54+
<rx-virtual-scroll-viewport [itemSize]="50">
55+
<div *rxVirtualFor="let hero of heroes$;">
5656
<div>
5757
<div><strong>{{ hero.name }}</strong></div>
5858
<div>{{ hero.id }}</div>
@@ -150,8 +150,8 @@ export class MyComponent {}
150150
### Fixed size virtual-scroll using `*rxVirtualFor` with `Observable` values
151151

152152
```html
153-
<rx-virtual-scroll-viewport>
154-
<div class="hero" [itemSize]="50" *rxVirtualFor="let hero of heroes$;">
153+
<rx-virtual-scroll-viewport [itemSize]="50">
154+
<div class="hero" *rxVirtualFor="let hero of heroes$;">
155155
<div>
156156
<div><strong>{{ hero.name }}</strong></div>
157157
<div>{{ hero.id }}</div>
@@ -179,8 +179,8 @@ export class AnyComponent {
179179
### Fixed size virtual-scroll using `*rxVirtualFor` with static values
180180

181181
```html
182-
<rx-virtual-scroll-viewport>
183-
<div class="hero" [itemSize]="50" *rxVirtualFor="let hero of heroes">
182+
<rx-virtual-scroll-viewport [itemSize]="50">
183+
<div class="hero" *rxVirtualFor="let hero of heroes">
184184
<div>
185185
<div><strong>{{ hero.name }}</strong></div>
186186
<div>{{ hero.id }}</div>
@@ -210,12 +210,8 @@ export class AnyComponent {
210210
The `trackBy` input either takes a `keyof T` or the regular `TrackByFunction` (`(index: number, item: T) => any`) as a value.
211211

212212
```html
213-
<rx-virtual-scroll-viewport>
214-
<div
215-
class="hero"
216-
[itemSize]="50"
217-
*rxVirtualFor="let hero of heroes; trackBy: 'id'"
218-
>
213+
<rx-virtual-scroll-viewport [itemSize]="50">
214+
<div class="hero" *rxVirtualFor="let hero of heroes; trackBy: 'id'">
219215
<div>
220216
<div><strong>{{ hero.name }}</strong></div>
221217
<div>{{ hero.id }}</div>

0 commit comments

Comments
 (0)