diff --git a/ionic/components/slides/slides.ts b/ionic/components/slides/slides.ts index 514b4c080a8..7c2422beb95 100644 --- a/ionic/components/slides/slides.ts +++ b/ionic/components/slides/slides.ts @@ -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, diff --git a/ionic/components/slides/test/loop/index.ts b/ionic/components/slides/test/loop/index.ts index cd4956465e8..ecee3ee0436 100644 --- a/ionic/components/slides/test/loop/index.ts +++ b/ionic/components/slides/test/loop/index.ts @@ -21,6 +21,8 @@ class MyApp { class: "blue" } ]; + + this.startingIndex = 2; } onSlideChanged(slider) { diff --git a/ionic/components/slides/test/loop/main.html b/ionic/components/slides/test/loop/main.html index 376e71111b0..a570e67623a 100644 --- a/ionic/components/slides/test/loop/main.html +++ b/ionic/components/slides/test/loop/main.html @@ -1,10 +1,26 @@ - - - {{ slide.name }} - - +
+ + + Loop {{ slide.name }} + + +
+ + +
+ + + Don't Loop {{ slide.name }} + + +