From d21ae88018b238b693afcc0acfcaad86d8e4f013 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Thu, 18 Feb 2016 12:17:40 -0500 Subject: [PATCH] refactor(slides): remove the attributes from the slider and use options to pass them instead MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit also commented out some attributes that aren’t working right now. BREAKING CHANGES: Slider attributes have been removed in favor of passing them in options references #5189 --- ionic/components/slides/slides.ts | 39 ++++--------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) diff --git a/ionic/components/slides/slides.ts b/ionic/components/slides/slides.ts index 87696e31d4..b45d261e6f 100644 --- a/ionic/components/slides/slides.ts +++ b/ionic/components/slides/slides.ts @@ -153,51 +153,30 @@ export class Slides extends Ion { zoomableHeight: number } - - /** - * @input {boolean} whether or not the slides should automatically change - */ - @Input() autoplay: any; - - /** - * @input {boolean} whether or not the slides should automatically change - */ - @Input() loop: any; - - /** - * @input {number} The slide index to start on - */ - @Input() index: any; - - /** - * @input {boolean} whether the slides should bounce - */ - @Input() bounce: any; - /** * @input {boolean} Whether the slide should show the page or not */ @Input() pager: any; /** - * @input {any} Any additional slider options you want to pass + * @input {any} Any slider options you want to configure, see swiper parameters: http://www.idangero.us/swiper/api/ */ @Input() options: any; /** * @input {number} Whether or not the slider can zoom in or out */ - @Input() zoom: any; + // @Input() zoom: any; /** * @input {number} how long it should take to zoom a slide */ - @Input() zoomDuration: any; + // @Input() zoomDuration: any; /** * @input {number} the max scale an slide can be zoomed */ - @Input() zoomMax: any; + // @Input() zoomMax: any; /** * @output {any} expression to evaluate when a slide has been changed @@ -234,19 +213,9 @@ 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, - preloadImages: false }, this.options); options.onTap = (swiper, e) => {