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:
Brandy Carney
2016-01-25 18:00:44 -05:00
parent 0b0500d242
commit de9a986236
3 changed files with 28 additions and 5 deletions

View File

@ -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,