Installations
npm install angular-vs-repeat
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
11.15.0
NPM Version
6.14.8
Score
84
Supply Chain
100
Quality
75.6
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
Download Statistics
Total Downloads
2,549,396
Last Day
1,328
Last Week
5,021
Last Month
23,506
Last Year
372,558
GitHub Statistics
817 Stars
205 Commits
229 Forks
23 Watching
16 Branches
13 Contributors
Bundle Size
10.43 kB
Minified
3.97 kB
Minified + Gzipped
Package Meta Information
Latest Version
2.0.14
Package Id
angular-vs-repeat@2.0.14
Unpacked Size
103.19 kB
Size
20.74 kB
File Count
15
NPM Version
6.14.8
Node Version
11.15.0
Total Downloads
Cumulative downloads
Total Downloads
2,549,396
Last day
6.8%
1,328
Compared to previous day
Last week
-21.7%
5,021
Compared to previous week
Last month
-12.9%
23,506
Compared to previous month
Last year
5.5%
372,558
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
23
angular-vs-repeat v2.0.9
Looking for a version for Angular 2?
Check out https://github.com/kamilkp/ng2-vs-for
Breaking changes in v2.x
- API changes for passing options. Options are now passed as an object to the
vs-repeat
attribute instead of using separate attributes for each option (except forvs-repeat-container
)
Major changes in v1.0.0-beta.0
- elements are no longer absolutely positioned
- no need for a mousewheel helper dummy element on MacOS (to preserve inertia scrolling)
- no need for
top
updating directives - even better performance
Virtual Scroll for AngularJS ngRepeat directive
Demo: http://kamilkp.github.io/angular-vs-repeat/
You can find the source code for this demo on branch "gh-pages".
Changelog: https://github.com/kamilkp/angular-vs-repeat/blob/master/CHANGELOG.md
DESCRIPTION:
vsRepeat
directive stands for Virtual Scroll Repeat. It turns a standard ngRepeated set of elements in a scrollable container
into a component, where the user thinks he has all the elements rendered and all he needs to do is scroll (without any kind of
pagination - which most users loath) and at the same time the browser isn't overloaded by that many elements/angular bindings etc.
The directive renders only so many elements that can fit into current container's clientHeight
/clientWidth
.
LIMITATIONS:
- current version only supports an Array as a right-hand-side object for
ngRepeat
- all rendered elements must have the same height/width or the sizes of the elements must be known up front
USAGE:
First include vs-repeat
as a module dependency in your app.
In order to use the vsRepeat directive you need to place a vs-repeat attribute on a direct parent of an element with ng-repeat
example:
1<div vs-repeat="options"> 2 <div ng-repeat="item in someArray"> 3 <!-- content --> 4 </div> 5</div>
or:
1<div vs-repeat="options"> 2 <div ng-repeat-start="item in someArray"> 3 <!-- content --> 4 </div> 5 <div> 6 <!-- something in the middle --> 7 </div> 8 <div ng-repeat-end> 9 <!-- content --> 10 </div> 11</div>
You can also measure the single element's height/width (including all paddings and margins), and then speficy it as a value
of the options' size
property. This can be used if one wants to override the automatically computed element size.
example:
1<div vs-repeat="{size: 50}"> <!-- the specified element height is 50px --> 2 <div ng-repeat="item in someArray"> 3 <!-- content --> 4 </div> 5</div>
- the vsRepeat directive must be applied to a direct parent of an element with
ngRepeat
- the library also supports ng-repeat-start/ng-repeat-end syntax
- the value of vsRepeat attribute is the single element's height/width measured in pixels. If none provided, the directive will compute it automatically
OPTIONAL PARAMETERS (attributes):
- vs-repeat-container="selector" - selector for element containing ng-repeat. (defaults to the current element)
OPTIONS:
Options shall be passed as an object to the vs-repeat
attribute e.g.:
1<div vs-repeat="{scrollParent: 'window', size: 20}"></div>
Available options:
-
horizontal
- boolean; stack repeated elements horizontally instead of vertically (defaults to false) -
offset-before
- top/left offset in pixels (defaults to 0) -
offset-after
- bottom/right offset in pixels (defaults to 0) -
scroll-margin
- how many pixels ahead should elements be rendered while scrolling (defaults to 0) -
latch
- if true, elements will be rendered gradually but won't be removed when scrolled away (defaults to false) -
size
- an angular expression evaluating to the element's size (in pixels) - it is possible to use the ngRepeat's local repeaing variable in this expression -
autoresize
- use this attribute without vs-size and without specifying element's size. The automatically computed element style will readjust upon window resize if the size is dependable on the viewport size -
scrolled-to-end
- callback will be called when the last item of the list is rendered -
scrolled-to-end-offset
- set this number to trigger the scrolledToEnd callback n items before the last gets rendered -
scrolled-to-beginning
- callback will be called when the first item of the list is rendered -
scrolled-to-beginning-offset
- set this number to trigger the scrolledToBeginning callback n items before the first gets rendered
EVENTS:
vsRepeatTrigger
- an event the directive listens for to manually trigger reinitializationvsRepeatResize
- an event the directive listens for to manually trigger the autosizing algorithmvsRepeatReinitialized
- an event the directive emits upon reinitialization done; the listener may accepts three arguments:event
,startIndex
andendIndex
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 2 are checked with a SAST tool
Reason
101 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-42xw-2xvc-qx8m
- Warn: Project is vulnerable to: GHSA-4w2v-q235-vp99
- Warn: Project is vulnerable to: GHSA-cph5-m8f7-6c5x
- Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx
- Warn: Project is vulnerable to: GHSA-pp7h-53gx-mx7r
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-wg6g-ppvx-927h
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-rq8g-5pc5-wrhr
- Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-hr2v-3952-633q
- Warn: Project is vulnerable to: GHSA-9j49-mfvp-vmhm
- Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-j4f2-536g-r55m
- Warn: Project is vulnerable to: GHSA-r7qp-cfhv-p84w
- Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2
- Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q
- Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-xf7w-r453-m56c
- Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5
- Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq
- Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm
- Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-282f-qqgm-c34q
- Warn: Project is vulnerable to: GHSA-7x7c-qm48-pq9c
- Warn: Project is vulnerable to: GHSA-rc3x-jf5g-xvc5
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-82v2-mx6x-wq7q
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-hxm2-r34f-qmc5
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-4c7m-wxvm-r7gc
- Warn: Project is vulnerable to: GHSA-pch5-whg9-qr2r
- Warn: Project is vulnerable to: GHSA-48ww-j4fc-435p
- Warn: Project is vulnerable to: GHSA-hwqf-gcqm-7353
- Warn: Project is vulnerable to: GHSA-9h6g-pr28-7cqp
- Warn: Project is vulnerable to: GHSA-6fx8-h7jm-663j
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-35q2-47q7-3pc3
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-hjp8-2cm3-cc45
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-fxwf-4rqh-v8g3
- Warn: Project is vulnerable to: GHSA-25hc-qcg6-38wj
- Warn: Project is vulnerable to: GHSA-xfhh-g9f5-x4m4
- Warn: Project is vulnerable to: GHSA-qm95-pgcg-qqfq
- Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9
- Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3
- Warn: Project is vulnerable to: GHSA-mf6x-7mm4-x2g7
- Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-f523-2f5j-gfcg
- Warn: Project is vulnerable to: GHSA-g7q5-pjjr-gqvp
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-xc7v-wxcw-j472
- Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq
- Warn: Project is vulnerable to: GHSA-mgfv-m47x-4wqp
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-72mh-269x-7mh5
- Warn: Project is vulnerable to: GHSA-h4j5-c7cj-74xg
Score
1.7
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreGathering detailed insights and metrics for angular-vs-repeat