'SwiperJs, It is possible? Angular
Is there a way to make such a slider?
I'm trying in several ways, but I can't even change the width of the slider.
I've looked in a few threads here and haven't found anything.
I put spacebetween, slideperview: 3 and nothing.
I wanted to be able to change the width of each slide.
I also want to change the color of the bullets. But I couldn't with .css
Here's my .html and .ts
<swiper #swiper [config]="config">
<ng-template swiperSlide>
...
</ng-template>
</swiper>
import { Component, OnInit } from '@angular/core';
import { SwiperOptions } from 'swiper';
import SwiperCore, {
import { Component, OnInit } from '@angular/core';
import { SwiperOptions } from 'swiper';
import SwiperCore, { Pagination } from "swiper";
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
constructor() { }
ngOnInit(): void {
SwiperCore.use([Pagination]);
}
config: SwiperOptions = {
slidesPerView: 1,
spaceBetween: 30,
pagination: {
type: 'bullets',
dynamicBullets: true
}
};
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
