File tree 4 files changed +8
-2
lines changed
playground/angular/src/app
4 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 10
10
[centeredSlides] ="true "
11
11
navigation
12
12
class ="mySwiper "
13
+ id ="mySwiperID "
13
14
>
14
15
< ng-template swiperSlide *ngFor ="let slide of virtualSlides; index as i "
15
16
> Slide {{ slide }}</ ng-template
Original file line number Diff line number Diff line change 4
4
5
5
.mySwiper {
6
6
background : #ccc ;
7
- padding : 2 0px 0 ;
7
+ padding : 30px 0 ;
8
+ }
9
+
10
+ #mySwiperID {
11
+ border : 1px solid red ;
8
12
}
Original file line number Diff line number Diff line change 5
5
</ ng-container >
6
6
< div *ngIf ="scrollbar && showScrollbar " class ="swiper-scrollbar " #scrollbarElRef > </ div >
7
7
< div *ngIf ="pagination && showPagination " class ="swiper-pagination " #paginationElRef > </ div >
8
- < div [ngClass] ="[wrapperClass, class].join(' ') ">
8
+ < div [ngClass] ="[wrapperClass, class].join(' ') " [attr.id] =" id " >
9
9
< ng-content select ="[slot=wrapper-start] "> </ ng-content >
10
10
< ng-template
11
11
*ngTemplateOutlet ="
Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ export class SwiperComponent implements OnInit {
162
162
@Input ( ) thumbs : SwiperOptions [ 'thumbs' ] ;
163
163
@Input ( ) zoom : SwiperOptions [ 'zoom' ] ;
164
164
@Input ( ) class : string ;
165
+ @Input ( ) id : string ;
165
166
@Input ( )
166
167
set navigation ( val ) {
167
168
const currentNext = typeof this . _navigation !== 'boolean' ? this . _navigation ?. nextEl : null ;
You can’t perform that action at this time.
0 commit comments