GithubHelp home page GithubHelp logo

allaud / quick-ng-repeat Goto Github PK

View Code? Open in Web Editor NEW
289.0 14.0 60.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%
javascript ng-repeat angular perfomance

quick-ng-repeat's People

Contributors

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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quick-ng-repeat's Issues

ng-repeat in ng-repeat

Have you tried quick-ng-repeat in quick-ng-repeat?
Getting error : Uncaught Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!

Same error for quick-ng-repeat in ng-repeat

5 seconds to 3 seconds

Thank you very much to have invented the quick - ng - repeat!
Ng - repeat is too slow, 500 lines of data binding time in 5 seconds,
After using quick - ng - repeat, time to 3 seconds, very good!!!!!!!!!!!
Is there any way to increase to 0.5 seconds?
My data is as follows:

<tr class="text-center"  quick-ng-repeat="l in tzLists.list" quick-repeat-list="ls" ng-cloak>
  <td >
      {{ $index+1 }}
  </td>
  <td>
      {{ l.tz.length }}串1
  </td>
  <td>
      <span quick-ng-repeat="tz in l.tz"
            quick-repeat-list="tzs"
            ng-class="whatClassIsIt(tz.type, tz.rqs)">
              <span class="match">
                  {{ tz.master }}
                  {{  tz.type=="SPF" ? "" : ""+ tz.rqs +"" }}
              </span>
              <span class="sel">{{ tz.selected }}</span>
             {{ tz.sp }}
      </span>
  </td>
  <td> {{ l.djj | number }} </td>
  <td>
      <div class="input-group">
          <span class="input-group-btn">
              <button class="btn btn-default btn-sm" type="button" ng-click="addbei($index,'-')" >-</button>
          </span>
          <input type="text"  ng-model="l.bei" min="0"  class="form-control text-center input-sm"
                 onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)));">
          <span class="input-group-btn">
              <button class="btn btn-default btn-sm" type="button" ng-click="addbei($index,'+')">+</button>
          </span>
      </div>

  </td>
  <td >
      <span ng-class="{'djj_red': l.bei*l.djj > tzLists.sss} "> {{ Math.round(100 * l.bei * l.djj) /100 | number }} </span>
  </td>
</tr> 

clean example to get started

I see that people used and appreciated it, but I'm not able to even get it working.
Example you have in your repo. is too complex having css and things..
I'm not expert in angular and I need a simple fiddle / plunkr showing your directive working. Can you provide a simpler working example where I can see 'item' and 'items' and what do these contain?

$interpolate quick-repeat-list attribute

It would be useful to interpolate the quick-repeat-list attribute so that the user has a little more flexibility in preventing name collisions in the global re-rendering service. The use case is e.g. multiple instances of a directive with custom re-rendering triggers.

I've addressed this in my local copy (it was super simple), and can/will submit a pull request when I have some time.

Demo page

Maybe its just me but I think your demo page is broken.

orderBy doesn't seems to work

Line of interest:

quick-ng-repeat="item in listofitems | orderBy:'something" quick-repeat-list="items"

Error message

Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: [["listofitems | orderBy:'number'; newVal:

ng-repeat work just fine.
Thanks

Does not work correct for angular resource

Example:
$scope.messages = Message.query();
and i get nothing using quick-ng-repeat, but ng-repeat works okay.

I noticed one thing:

line 204 for loop: collectionKeys.length return zero, but console.log(collectionKeys) shows:

$promise: Object, $resolved: false]
0: Resource
1: Resource
[...]
35: Object
36: Resource
$promise: Object
$resolved: true
length: 37
proto: Array[0]

$digest already in progress (on $rootScope)

I'm getting a "$digest already in progress" error from this line: https://github.com/allaud/quick-ng-repeat/blob/master/quick-ng-repeat.js#L251

Why is $digest being applied? I'm willing to fix. Commenting it out seemingly seems to work...

Error: [$rootScope:inprog] http://errors.angularjs.org/1.2.7/$rootScope/inprog?p0=%24digest
    at Error (<anonymous>)
    at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.min.js:6:449
    at m (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.min.js:96:384)
    at h.$digest (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.min.js:99:480)
    at h.$delegate.__proto__.$digest (<anonymous>:844:31)
    at Object.$scope.$watch.quick_repeat_list.(anonymous function) (https://dev.example.com/js/quick-ng-repeat.js:251:28)
    at Object.applyFunction [as fn] (<anonymous>:778:50)
    at h.$digest (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.min.js:100:299)
    at h.$delegate.__proto__.$digest (<anonymous>:844:31)
    at h.$apply (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.min.js:103:100) 

Does it support filters and alias?

Hi,
I have an expression like this:
ng-repeat="event in filteredEvents = (comp.events | filter:listerSearch | xRange:filterXType.val:filterXMin:filterXMax | dateRange:filterStartDate:filterEndDate)"

how could it be possible to implement this in your directive ?
Thanks.

bump bower version

I had an issue with quick-ng-repeat only to find you've fixed it upstream (which is great well done) however bower won't update because you never update the version number.

Edit: I noticed the bower version is on a different account???

Pretty please!

Digest cycle error on $rootScope filter

Have such error:

Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!

while trying quick-ng-repeat with filter which is used with $rootScope:

 <tr quick-ng-repeat="event in Event.competition.events | filter:values.globalSearchQuery">

Without filter it works fine.

where is items function defined?

I see _.defer(quickRepeatList.items, $scope.list), but I don't see anywhere items is defined

When I use this directive, I got an error that quickRepeatList.items is not defined error.

Could you explain more?

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.