<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shreya on Medium]]></title>
        <description><![CDATA[Stories by Shreya on Medium]]></description>
        <link>https://medium.com/@thepariah?source=rss-3f908214a2f8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fQeL9tuGCP-3pyOvuU_MLQ.jpeg</url>
            <title>Stories by Shreya on Medium</title>
            <link>https://medium.com/@thepariah?source=rss-3f908214a2f8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 23:17:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thepariah/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Adding Owl Carousel in Angular 7/8/9]]></title>
            <link>https://medium.com/@thepariah/adding-owl-carousel-in-angular-7-8-9-67f401665ee2?source=rss-3f908214a2f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/67f401665ee2</guid>
            <category><![CDATA[carousel]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Shreya]]></dc:creator>
            <pubDate>Thu, 16 Jul 2020 14:02:13 GMT</pubDate>
            <atom:updated>2020-07-16T14:02:13.354Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Note:- Make sure you do have Angular and Node installed on your system.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*P1F111I_Xh-vt6Nl" /><figcaption>Photo by <a href="https://unsplash.com/@codestorm?utm_source=medium&amp;utm_medium=referral">Safar Safarov</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>So, we are going to add the carousel using npm package ‘ngx-owl-carousel-o’. I’ll divide the procedure into steps so it’s easy to understand.</p><p><strong>Step 1:</strong> Go to the directory where you wish to create your angular project and then open the terminal/cmd and enter:</p><pre>ng new &lt;project-name&gt;</pre><p><strong>Step 2: </strong>Open your favorite code editor. (P.S. If you don’t have one, I’d recommend you to go for VS Code which is very compatible. ) Now, open the project folder in the code editor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1DW4tp9S5sE3eLNMBwKSDA.png" /><figcaption>It will appear something like this.</figcaption></figure><p><strong>Step 3:</strong> Now run the following command in the terminal after changing the directory to the project folder.</p><pre>npm install ngx-owl-carousel-o</pre><p><strong>Step 4:</strong> Now add the required CSS files to angular.json</p><pre> &quot;styles&quot;: [<br>              &quot;./node_modules/ngx-owl-carousel-o/lib/styles/prebuilt-themes/owl.carousel.min.css&quot;,<br>              &quot;./node_modules/ngx-owl-carousel-o/lib/styles/prebuilt-themes/owl.theme.default.min.css&quot;,<br>              &quot;src/styles.css&quot;<br>            ]</pre><p><strong>Step 5:</strong> Update app.module.ts by adding <strong>BrowserAnimationModule</strong> and <strong>CarouselModule</strong></p><pre>import { BrowserModule } from &#39;@angular/platform-browser&#39;;<br>import { NgModule } from &#39;@angular/core&#39;;<br><br>import { AppComponent } from &#39;./app.component&#39;;<br>import { AppRoutingModule } from &#39;./app-routing.module&#39;;<br><br>import { BrowserAnimationsModule } from &#39;@angular/platform-browser/animations&#39;;<br>import { CarouselModule } from &#39;ngx-owl-carousel-o&#39;;<br><br>@NgModule({<br>  declarations: [<br>    AppComponent<br> ],<br>  imports: [<br>    BrowserModule,<br>    AppRoutingModule,<br>    <br>    BrowserAnimationsModule,<br>    CarouselModule <br>  ],<br>  providers: [],<br>  bootstrap: [AppComponent]<br>})<br>export class AppModule { }</pre><p><strong>Step 6:</strong> Go to app.component.html and paste the following code</p><pre>&lt;owl-carousel-o [options]=&quot;customOptions&quot;&gt;<br>    &lt;ng-template carouselSlide&gt;<br>        &lt;div class=&quot;slide&quot;&gt;<br>            &lt;img src=&quot;assets/dog.jpg&quot;&gt;<br>        &lt;/div&gt;<br>    &lt;/ng-template&gt;<br>    &lt;ng-template carouselSlide&gt;<br>        &lt;div class=&quot;slide&quot;&gt;<br>            &lt;img src=&quot;assets/cat.jpg&quot;&gt;<br>        &lt;/div&gt;<br>    &lt;/ng-template&gt;<br>    &lt;ng-template carouselSlide&gt;<br>        &lt;div class=&quot;slide&quot;&gt;<br>            &lt;img src=&quot;assets/monkey.jpg&quot;&gt;<br>        &lt;/div&gt;<br>    &lt;/ng-template&gt;<br>    &lt;ng-template carouselSlide&gt;<br>        &lt;div class=&quot;slide&quot;&gt;<br>            &lt;img src=&quot;assets/chihuahua.jpg&quot;&gt;<br>        &lt;/div&gt;<br>    &lt;/ng-template&gt;<br>    &lt;ng-template carouselSlide&gt;<br>        &lt;div class=&quot;slide&quot;&gt;<br>            &lt;img src=&quot;assets/rabbit.jpg&quot;&gt;<br>        &lt;/div&gt;<br>    &lt;/ng-template&gt;<br>&lt;/owl-carousel-o&gt;</pre><p><strong>Step 7:</strong> Go to app.component.ts and paste this code</p><pre>import { Component} from &#39;@angular/core&#39;;<br><br>import { OwlOptions } from &#39;ngx-owl-carousel-o&#39;;<br><br>@Component({<br>  selector: &#39;app-root&#39;,<br>  templateUrl: &#39;./app.component.html&#39;,<br>  styleUrls: [&#39;./app.component.css&#39;]<br>})</pre><pre>export class AppComponent {<br>  customOptions: any = {<br>  loop: true,<br>  margin: 10,<br>  autoplay:true,<br>  responsiveClass: true,<br>  navText: [&#39;Previous&#39;, &#39;Next&#39;],<br>  responsive: {<br>    0: {<br>     items: 1<br>   },<br>    480: {<br>     items: 2<br>   },<br>    940: {<br>     items: 3<br>   }<br>  },<br> nav: true<br>}</pre><pre>constructor() { }<br>ngOnInit(): void {}</pre><pre>}</pre><blockquote>Note:- You can also create separate component for your owl carousel.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67f401665ee2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>