Angular Owl Carousel/Slider Example Tutorial

By Hardik Savani | March 11, 2021 | Category : Angular

Hi Dev,

In this tutorial, i will show you angular owl carousel example. This article will give you simple example of angular owl-carousel example. In this article, we will implement a angular owl slider example. let’s discuss about angular owl carousel example.

ngx-owl-carousel-o package provide to adding owl slider to your angular project. here we will see owl carousel simple example with preview and you can easily implement owl carousel with angular 6, angular 7, angular 8, angular 9, angular 10 and angular 11 version.


Step 1: Create New App

You can easily create your angular app using bellow command:

ng new myNewApp

Step 2: Install npm Package

Now in this step, we need to just install jquery and ngx-owl-carousel-o in our angular application. so let's add as like bellow:

npm install jquery --save

npm install ngx-owl-carousel-o

Step 3: Import CarouselModule

we will import CarouselModule module as like bellow code:


import { BrowserModule } from '@angular/platform-browser';

import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

import { CarouselModule } from 'ngx-owl-carousel-o';

import { BrowserAnimationsModule } from '@angular/platform-browser/animations';


declarations: [



imports: [





providers: [],

bootstrap: [AppComponent]


export class AppModule { }

now we also need to import js and css into our angular.json file. do it as like bellow:



"styles": [




"scripts": [




Step 4: Update Ts File

here, we need to update ts file as like bellow:


import { Component } from '@angular/core';

import { OwlOptions } from 'ngx-owl-carousel-o';


selector: 'app-root',

templateUrl: './app.component.html',

styleUrls: ['./app.component.css']


export class AppComponent {

title = 'ng-carousel-demo';

customOptions: OwlOptions = {

loop: true,

mouseDrag: false,

touchDrag: false,

pullDrag: false,

dots: false,

navSpeed: 700,

navText: ['', ''],

responsive: {

0: {

items: 1


400: {

items: 2


740: {

items: 3


940: {

items: 4



nav: true


slides = [

{id: 1, img: ""},

{id: 2, img: ""},

{id: 3, img: ""},

{id: 4, img: ""},

{id: 5, img: ""},

{id: 6, img: ""},

{id: 6, img: ""}



Step 5: Update HTML File

here, we need to update html file as like bellow code:


<h1>Angular Owl Carousel Integration Tutorial -</h1>

<owl-carousel-o [options]="customOptions">

<ng-container *ngFor="let slide of slides">

<ng-template carouselSlide [id]="">

<img [src]="slide.img" >




Now you can run by bellow command:

ng serve

now you can check it.

I hope it can help you...

Tags : Angular

Hardik Savani
My name is Hardik Savani. I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.
Follow Me: Github Twitter
***Do you want me hire for your Project Work? Then Contact US.

We are Recommending you: