Within my Angular project, I incorporated an Owl Carousel into the home-component.html file. Here is a snippet of the code:
<section>
<div class="container">
<h1 class="products-title">New Arrivals</h1>
<div class="slider">
<owl-carousel-o [options]="customOptions" class="owl-stage">
<ng-template carouselSlide *ngFor="let product of products">
<div class="card">
<div class="card-content" [ngStyle]="{'background-color': isDarkTheme ? '#5eda5e' : '#3b5b2d'}">
<img class="product-image" [src]="product.imgSrc" [alt]="product.name">
<h2 class="product-title">{{ product.name | translate}}</h2>
<p class="product-description">{{ product.description | translate}}</p>
<p class="product-price">{{ product.price | currency:'USD':'symbol':'1.2-2' }}</p>
</div>
</div>
</ng-template>
</owl-carousel-o>
</div>
</div>
</section>
However, instead of displaying the cards horizontally as intended, they are being displayed vertically. Even when attempting to use display: flex and inspecting the
<owl-carousel-o></owl-carousel-o\>
, which actually has the owl-stage class, the issue persists despite applying display: flex.
I have been trying to align the cards containing product details and images horizontally. Below is the code snippet from app-component.ts:
import { Component, OnInit } from '@angular/core';
// Remaining content remains unchanged