How to Add Carousel in Angular 11 Material?

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

This article will provide some of the most important example how to add carousel in angular 11 material. if you have question about angular 11 material carousel slider example then i will give simple example with solution. In this article, we will implement a angular 11 material carousel example. Here you will learn angular 11 material design carousel example. Let's get started with angular 11 @ngbmodule/material-carousel example.

@ngbmodule/material-carousel package provide to adding material carousel to your angular project. here we will see material carousel simple example with preview:


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 ngmodule/material-carousel and angular/material in our angular application. so let's add as like bellow:

ng add @angular/material

npm install @ngmodule/material-carousel

Step 3: Import MatCarouselModule

we will import MatCarouselModule module as like bellow code:


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

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

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

import {FormsModule, ReactiveFormsModule} from '@angular/forms';

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

import { MatCarouselModule } from '@ngmodule/material-carousel';


declarations: [



imports: [







providers: [],

bootstrap: [AppComponent]


export class AppModule { }

Step 4: Update Ts File

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


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

import { MatCarousel, MatCarouselComponent } from '@ngmodule/material-carousel';


selector: 'app-root',

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

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


export class AppComponent {

slides = [

{'image': ''},

{'image': ''},

{'image': ''},

{'image': ''},

{'image': ''}



Step 5: Update HTML File

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


<h1>Angular Material Carousel Slider Example -</h1>


timings="250ms ease-in"
















*ngFor="let slide of slides; let i = index"






Now you can run by bellow command:

ng serve

now you can check it.

I hope it can help you...

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: