Closed shabbir-dhangot closed 7 years ago
Set the options key in your components ts file and it will work
Can you provide sample respective to this? Unable to find any implementation on readme file.
Do something like this in your ts file:
carouselOptions: any = {
nav : false,
dots: false,
loop:false,
items:1,
navText:['<i class='fa fa-chevron-circle-left' aria-hidden='true'></i>','<i class='fa fa-chevron-circle-right' aria-hidden='true'></i>']
}
and in html
<owl-carousel #owlSlider
[options]="carouselOptions"
[items]="images"
[carouselClasses]="['owl-theme', 'sliding']">
<div class="item deal-slide" *ngFor="let image of images;let i = index">
<div class="coupons-div" style="cursor:pointer;">
<img class="deals-image" src="http://lorempixel.com/1080/300/{{image}}"/><br/>
</div>
</div>
</owl-carousel>
Also buttons coming down the carousel not left and right.
Adding modified options carouselOptions: any = { nav : true, dots: false, loop:false, items:1, navText:['',''] }
I think The Navtext should be defined with template literales (`) not with ( ' ) -
navText: [ `<i class='fa fa-chevron-circle-left' aria-hidden='true'></i>`, `<i class='fa fa-chevron-circle-right' aria-hidden='true'></i>`]
It is working for me.
I have seen couple of example to give arrow icons to slider. But I am unable to do it.
Below is my Implementation.
below is error showing on the console.
for some reason complete error not showing by github. PFA of screenshot.