angular2-virtual-scroll
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "angular2-virtual-scroll", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Angular 2 module for virtual -infinite- list. Supports multi-column", | ||
@@ -5,0 +5,0 @@ "main": "dist/virtual-scroll.js", |
@@ -72,2 +72,40 @@ | ||
**Step 4:** Create 'list-item' component. | ||
'list-item' must a custom angular2 component, outside of this library. A sample list item is give below or check the [demo app](https://github.com/rintoj/angular2-virtual-scroll/tree/master/demo) for [list-item.component.ts](https://github.com/rintoj/angular2-virtual-scroll/blob/master/demo/src/app/lists/list-item.component.ts). | ||
``` | ||
import { Component, Input } from '@angular/core'; | ||
export interface ListItem { | ||
index?: number; | ||
name?: string; | ||
gender?: string; | ||
age?: number; | ||
email?: string; | ||
phone?: string; | ||
address?: string; | ||
} | ||
@Component({ | ||
selector: 'list-item', | ||
template: ` | ||
<div class="avatar">{{item.index}}</div> | ||
<div class="item-content"> | ||
<div class="name">{{item.name}}</div> | ||
<div> | ||
<span class="badge">{{item.age}} / {{item.gender}}</span> | ||
<span>{{item.email}} | {{item.phone}}</span> | ||
</div> | ||
<div>{{item.address}}</div> | ||
</div> | ||
`, | ||
styleUrls: ['./list-item.scss'] | ||
}) | ||
export class ListItemComponent { | ||
@Input() | ||
item: ListItem; | ||
} | ||
``` | ||
## Contributing | ||
@@ -74,0 +112,0 @@ Contributions are very welcome! Just send a pull request. Feel free to contact me or checkout my [GitHub](https://github.com/rintoj) page. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25297
150