Gathering detailed insights and metrics for ngx-slick-carousel
Gathering detailed insights and metrics for ngx-slick-carousel
Gathering detailed insights and metrics for ngx-slick-carousel
Gathering detailed insights and metrics for ngx-slick-carousel
npm install ngx-slick-carousel
54.5
Supply Chain
94.6
Quality
76.2
Maintenance
100
Vulnerability
97.9
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
114 Stars
67 Commits
45 Forks
2 Watching
3 Branches
6 Contributors
Updated on 21 Nov 2024
TypeScript (69.47%)
JavaScript (30.53%)
Cumulative downloads
Total Downloads
Last day
-5.4%
4,336
Compared to previous day
Last week
7.7%
24,309
Compared to previous week
Last month
-3.7%
98,869
Compared to previous month
Last year
3.5%
1,183,847
Compared to previous year
1
5
To install this library, run:
1$ npm install jquery @types/jquery --save 2$ npm install slick-carousel @types/slick-carousel --save 3$ npm install ngx-slick-carousel --save
Once you have published your library to npm, you can import your library in any Angular application by running:
1$ npm install ngx-slick-carousel --save
and then from your Angular standalone component:
1import { Component } from '@angular/core'; 2 3// Import your library 4import { SlickCarouselModule } from 'ngx-slick-carousel'; 5 6@Component({ 7 ..., 8 standalone: true, 9 imports: [ 10 SlickCarouselModule, // Put in here 11 ], 12}) 13export class ExampleComponent { 14 ... 15}
angular.json
file : "styles": [
...
"node_modules/slick-carousel/slick/slick.scss",
"node_modules/slick-carousel/slick/slick-theme.scss",
...
]
angular.json
file : "scripts": [
...
"node_modules/jquery/dist/jquery.min.js",
"node_modules/slick-carousel/slick/slick.min.js",
...
]
Once your library is imported, you can use its components, directives and pipes in your Angular application:
1 <!-- You can now use your library component in app.component.html --> 2 <ngx-slick-carousel class="carousel" 3 #slickModal="slick-carousel" 4 [config]="slideConfig" 5 (init)="slickInit($event)" 6 (breakpoint)="breakpoint($event)" 7 (afterChange)="afterChange($event)" 8 (beforeChange)="beforeChange($event)"> 9 @for (slide of slides; track slide.img) { 10 <div ngxSlickItem class="slide"> 11 <img src="{{ slide.img }}" alt="" width="100%"> 12 </div> 13 } 14 </ngx-slick-carousel> 15 16 <button (click)="addSlide()">Add</button> 17 <button (click)="removeSlide()">Remove</button> 18 <button (click)="slickModal.slickGoTo(2)">slickGoto 2</button> 19 <button (click)="slickModal.unslick()">unslick</button>
1@Component({ 2 ..., 3 standalone: true, 4 imports: [ 5 SlickCarouselModule, 6 ], 7}) 8class ExampleComponent { 9 slides = [ 10 {img: "http://placehold.it/350x150/000000"}, 11 {img: "http://placehold.it/350x150/111111"}, 12 {img: "http://placehold.it/350x150/333333"}, 13 {img: "http://placehold.it/350x150/666666"} 14 ]; 15 slideConfig = {"slidesToShow": 4, "slidesToScroll": 4}; 16 17 addSlide() { 18 this.slides.push({img: "http://placehold.it/350x150/777777"}) 19 } 20 21 removeSlide() { 22 this.slides.length = this.slides.length - 1; 23 } 24 25 slickInit(e) { 26 console.log('slick initialized'); 27 } 28 29 breakpoint(e) { 30 console.log('breakpoint'); 31 } 32 33 afterChange(e) { 34 console.log('afterChange'); 35 } 36 37 beforeChange(e) { 38 console.log('beforeChange'); 39 } 40}
(IMPORTANT) If slides
variable will be changed dynamically, use trackBy
in *ngFor
syntax. It will minimize ngxSlickItem
directive recreation.
To generate all *.js
, *.d.ts
and *.metadata.json
files:
1$ npm run build
To lint all *.ts
files:
1$ npm run lint
MIT © leo6104
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 4/23 approved changesets -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
25 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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 More