Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pioug/md-virtual-repeater

Infinite list / virtual scroll directive for Angular 1.x
https://github.com/pioug/md-virtual-repeater

angular directive infinite-scroll virtual-scroll

Last synced: 3 months ago
JSON representation

Infinite list / virtual scroll directive for Angular 1.x

Awesome Lists containing this project

README

        

`md-virtual-repeater` is a directive from [angular/material](https://github.com/angular/material).

## Demo

https://pioug.github.io/md-virtual-repeater/

Source: https://github.com/pioug/md-virtual-repeater/blob/gh-pages/index.html

## Why?

- Best implementation of the infinite list for Angular 1.x
- Standalone version (no dependency to Angular Material)
- Simple installation (no external CSS, no bundle tool required)
- Safe for minification ([DI annotation](https://docs.angularjs.org/guide/di) included)

## Installation

```bash
# With NPM
npm install @pioug/md-virtual-repeater

# With Bower
bower install md-virtual-repeater
```

Include the script `virtual-repeater.js` in your HTML:

```html

```

Load the Angular module `virtualRepeat` in your JS:

```js
angular.module('myAngularApp', ['virtualRepeat']);
```

## Usage

```html

Hello {{i}}!

```

```css
md-virtual-repeat-container {
height: 100%;
overflow-x: hidden;
overflow-y: scroll;
position: absolute;
width: 100%;
}

md-virtual-repeat-container:-webkit-scrollbar {
width: 0 !important;
}
```

## Documentation

- `mdVirtualRepeat`: https://material.angularjs.org/latest/api/directive/mdVirtualRepeat
- `mdVirtualRepeatContainer`: https://material.angularjs.org/latest/api/directive/mdVirtualRepeatContainer