Giter Site home page Giter Site logo

rellampec / quick-ng-repeat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from allaud/quick-ng-repeat

0.0 0.0 0.0 688 KB

A much more quicker replacement for AngularJS ng-repeat directive

License: MIT License

CSS 0.79% HTML 16.92% JavaScript 82.29%

quick-ng-repeat's Introduction

AngularJS directive for much more quicker lists rendering

Features

  • Shallow list watch (ngRepeat uses deep watch)
  • Animations support
  • Special service to cause list render outside of digest cycle
  • Smooth scrolling even on heavy compited lists (check example)
  • About 200% performance boost
  • Still hesitating? Try to scroll page with ng-repeat list and a page with quick-ng-repeat

Usage example:

Require quick-ng-repeat.js to your project and use this syntax in your templates:

<ul>
  <li quick-ng-repeat="item in list" quick-repeat-list="items">
    {{ item.name }}
  </li>
</ul>

Installation

Using bower package manager:
bower i quick-ngrepeat --save

Note the single hyphen in the package name

Using the browser:
<script src="quick-ng-repeat.js"></script>

Why we need the 'quick-repeat-list' attribute?

In quick-ng-repeat directive everything is done to make is really fast. So we store a special callback with name of this attribute. This is a full answer

Compared to usual ngRepeat

  • Compare example/index.html (uses quickNgRepeat) and example/index_classic.html (uses classic NgRepeat)

Example

Directive live example in ./example

Try out the demo (try to scroll): page with ng-repeat list and page with quick-ng-repeat

To run example

cd example && python -m SimpleHTTPServer

quick-ng-repeat's People

Contributors

allaud avatar ashcoolman avatar christianvuerings avatar jhollingworth avatar wuliupo avatar subinvarghesein avatar justinmc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.