mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
fix(slides): convert loop attribute to a boolean and index to a number before passing to slides
Not sure I like the index attribute though. Fixes #5189
This commit is contained in:
@ -142,10 +142,15 @@ export class Slides extends Ion {
|
||||
}
|
||||
|
||||
this.showPager = isTrueProperty(this.pager);
|
||||
this.loop = isTrueProperty(this.loop);
|
||||
|
||||
if (typeof(this.index) != 'undefined') {
|
||||
this.index = parseInt(this.index);
|
||||
}
|
||||
|
||||
var options = defaults({
|
||||
loop: this.loop,
|
||||
initialSlide: this.index,
|
||||
pagination: '.swiper-pagination',
|
||||
paginationClickable: true,
|
||||
lazyLoading: true,
|
||||
|
Reference in New Issue
Block a user