77 < c-card-body >
88 < p class ="text-body-secondary small "> Here’s a carousel with slides</ p >
99 < app-docs-example href ="components/carousel ">
10- < c-carousel (itemChange) ="onItemChange($event) " [interval] ="7000 " transition =" slide " >
10+ < c-carousel (itemChange) ="onItemChange($event) " [interval] ="7000 ">
1111 < c-carousel-inner >
1212 @for (slide of slides[0]; track slide.src) {
1313 < c-carousel-item >
3535 Adding in the previous and next controls with < code > c-carousel-controls</ code > component.
3636 </ p >
3737 < app-docs-example href ="components/carousel/#with-controls ">
38- < c-carousel (itemChange) ="onItemChange($event) " [interval] ="0 ">
39- < c-carousel-inner >
40- @for (slide of slides[0]; track slide.src) {
41- < c-carousel-item >
38+ < c-carousel (itemChange) ="onItemChange($event) " [interval] ="0 " aria-roledescription =" carousel " aria-label =" CoreUI Angular Carousel Example " >
39+ < c-carousel-inner id =" carousel-items " >
40+ @for (slide of slides[0]; track slide.src; let i = $index ) {
41+ < c-carousel-item aria-roledescription =" slide " [attr.aria-label] =" (i + 1).toString() + ' of '+ slides[0].length " >
4242 < img
4343 [src] ="slide.src "
4444 alt ="{{slide.title}} "
4848 </ c-carousel-item >
4949 }
5050 </ c-carousel-inner >
51- < c-carousel-control caption ="Previous " direction ="prev " i18n-caption />
52- < c-carousel-control caption ="Next " direction ="next " i18n-caption />
51+ < c-carousel-control caption ="Previous " direction ="prev " i18n-caption aria-controls =" carousel-items " aria-label =" Previous Slide " />
52+ < c-carousel-control caption ="Next " direction ="next " i18n-caption aria-controls =" carousel-items " aria-label =" Next Slide " />
5353 </ c-carousel >
5454 </ app-docs-example >
5555 </ c-card-body >
102102 </ p >
103103 < app-docs-example href ="components/carousel/#with-indicators ">
104104 < c-carousel (itemChange) ="onItemChange($event) " [activeIndex] ="1 " [dark] ="true " [interval] ="5000 " direction ="prev ">
105- < c-carousel-indicators #indicators ="cCarouselIndicators ">
106- < ng-template cTemplateId ="carouselIndicatorsTemplate ">
107- @for (slide of slides[1]; track slide; let i = $index) {
108- < button
109- [attr.data-coreui-target] ="i "
110- type ="button "
111- (click) ="indicators.onClick(i) "
112- [class] ="{ active: indicators.active === i, border: '1px' } "
113- [attr.aria-current] ="indicators.active === i ">
114- < img
115- [src] ="slide.src "
116- alt ="{{slide.title}} "
117- class ="d-flex w-100 "
118- loading ="lazy "
119- />
120- </ button >
121- }
122- </ ng-template >
123- </ c-carousel-indicators >
105+ < c-carousel-indicators />
106+ <!-- <c-carousel-indicators #indicators="cCarouselIndicators">-->
107+ <!-- <ng-template cTemplateId="carouselIndicatorsTemplate">-->
108+ <!-- @for (slide of slides[1]; track slide; let i = $index) {-->
109+ <!-- <button-->
110+ <!-- [attr.data-coreui-target]="i"-->
111+ <!-- type="button"-->
112+ <!-- (click)="indicators.onClick(i)"-->
113+ <!-- [class]="{ active: indicators.active === i, border: '1px' }"-->
114+ <!-- [attr.aria-current]="indicators.active === i">-->
115+ <!-- <img-->
116+ <!-- [src]="slide.src"-->
117+ <!-- alt="{{slide.title}}"-->
118+ <!-- class="d-flex w-100"-->
119+ <!-- loading="lazy"-->
120+ <!-- />-->
121+ <!-- </button>-->
122+ <!-- }-->
123+ <!-- </ng-template>-->
124+ <!-- </c-carousel-indicators>-->
124125 < c-carousel-inner >
125126 @for (slide of slides[0]; track slide.src) {
126127 < c-carousel-item >
@@ -189,7 +190,7 @@ <h3>{{ slide.title }}</h3>
189190 with a fade transition instead of a slide.
190191 </ p >
191192 < app-docs-example href ="components/carousel/#crossfade ">
192- < c-carousel (itemChange) ="onItemChange($event) " [animate] =" false " [ interval] ="5000 " transition ="crossfade ">
193+ < c-carousel (itemChange) ="onItemChange($event) " [interval] ="interval() " transition ="crossfade ">
193194 < c-carousel-inner >
194195 @for (slide of slides[0]; track slide.src) {
195196 < c-carousel-item >
@@ -208,6 +209,9 @@ <h3>{{ slide.title }}</h3>
208209 < c-carousel-control caption ="Previous " direction ="prev " i18n-caption />
209210 < c-carousel-control caption ="Next " direction ="next " i18n-caption />
210211 </ c-carousel >
212+ < hr >
213+ < button cButton (click) ="toggleInterval() "> Toggle interval</ button >
214+ {{ interval() }}
211215 </ app-docs-example >
212216 </ c-card-body >
213217 </ c-card >
0 commit comments