Gathering detailed insights and metrics for ngx-owl-carousel
Gathering detailed insights and metrics for ngx-owl-carousel
Gathering detailed insights and metrics for ngx-owl-carousel
Gathering detailed insights and metrics for ngx-owl-carousel
An angular2 (4) wrapper for jquery owl-carousel library with dynamic carousel item change detection
npm install ngx-owl-carousel
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
70 Stars
65 Commits
25 Forks
8 Watchers
1 Branches
2 Contributors
Updated on Nov 11, 2022
Latest Version
2.0.7
Package Id
ngx-owl-carousel@2.0.7
Size
7.12 kB
NPM Version
5.5.1
Node Version
9.2.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
This Library requires jquery and owl.carousel to be installed globally
For commonJs based application load jquery and owl.carousel using script loader or use link tag in html file
Install script-loader if you don't have already
1npm install script-loader
and in vendor.ts
1require('script!jquery'); 2require('script!owl.carousel');
OR
inside index.html put this inside the head tag
1<script type="application/javascript" src="/node_modules/jquery/dist/jquery.js"></script> 2<script type="application/javascript" src="/node_modules/owl.carousel/dist/owl.carousel.js"></script>
If using angular-cli
Add this to angular-cli.json file
1"scripts": [ 2 "../node_modules/jquery/dist/jquery.js", 3 "../node_modules/owl.carousel/dist/owl.carousel.js" 4]
To install this library, run:
1$ npm install ngx-owl-carousel --save
and then from your Angular AppModule
:
1import { BrowserModule } from '@angular/platform-browser'; 2import { NgModule } from '@angular/core'; 3 4import { AppComponent } from './app.component'; 5 6// Import your library 7import { OwlModule } from 'ngx-owl-carousel'; 8 9@NgModule({ 10 declarations: [ 11 AppComponent 12 ], 13 imports: [ 14 BrowserModule, 15 OwlModule 16 ], 17 providers: [], 18 bootstrap: [AppComponent] 19}) 20export class AppModule { }
Include these two css files
owl.carousel.css file This is required css files.
owl.theme.default file This file is optional. However to use default navigation controls or dots buttons this file is necessary.
Inside angular-cli.json add these lines:
1"styles": [ 2 "../node_modules/owl.carousel/dist/assets/owl.carousel.css", 3 "../node_modules/owl.carousel/dist/assets/owl.theme.default.css" 4]
OR include these files in main scss file.
1import "~owl.carousel/dist/assets/owl.carousel.css"; 2import "~owl.carousel/dist/assets/owl.theme.default.css";
OR include these files in index.html file inside head tag.
1 <link rel="stylesheet" href="/node_modules/owl.carousel/dist/assets/owl.carousel.min.css"> 2 <link rel="stylesheet" href="/node_modules/owl.carousel/dist/assets/owl.theme.default.min.css">
Once your library is imported, you can use OwlCarousel component very easily in your Angular application:
1<!-- You can use owl-carousel selector to include its component --> 2 <owl-carousel 3 [options]="{items: 3, dots: false, navigation: false}" 4 <!-- If images array is dynamically changing pass this array to [items] input --> 5 [items]="images" 6 <!-- classes to be attached along with owl-carousel class --> 7 [carouselClasses]="['owl-theme', 'row', 'sliding']"> 8 <div class="item" *ngFor="let image of images;let i = index"> 9 <div class="thumbnail-image" [ngStyle]="{'background': 'url(abc.jpg) no-repeat scroll center center / 80px 80px'}"></div> 10 </div> 11 </owl-carousel>
Note: Please remove comments from the above example else you will get errors.
This package is a wrapper for the jquery library owl.carousel. Jquery is not supported in Angular Universal currently. Therefore the carousel cannot be rendered server side. However if you are using angular universal, do not include owl.carousel ("/node_modules/owl.carousel/dist/owl.carousel.js") in server side configuration.
next(options?: any[])
previous(options?: any[])
to(options?: any[])
trigger(action: string, options?: any[])
1<owl-carousel #owlElement 2
1import {OwlCarousel} from 'ngx-owl-carousel'; 2 3export class HomeComponent { 4@ViewChild('owlElement') owlElement: OwlCarousel 5 6 7 fun() { 8 this.owlElement.next([200]) 9 //duration 200ms 10 } 11}
All callbacks listed in native owl carousel's documentation https://owlcarousel2.github.io/OwlCarousel2/docs/api-events.html can be used in options properties.
Callbacks list:
This project is licensed under the terms of the MIT license.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/29 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
Reason
project is not fuzzed
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
33 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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