Skip to content

Commit d21ae88

Browse files
committed
refactor(slides): remove the attributes from the slider and use options to pass them instead
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
1 parent 8f0b88b commit d21ae88

File tree

1 file changed

+4
-35
lines changed

1 file changed

+4
-35
lines changed

ionic/components/slides/slides.ts

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -153,51 +153,30 @@ export class Slides extends Ion {
153153
zoomableHeight: number
154154
}
155155

156-
157-
/**
158-
* @input {boolean} whether or not the slides should automatically change
159-
*/
160-
@Input() autoplay: any;
161-
162-
/**
163-
* @input {boolean} whether or not the slides should automatically change
164-
*/
165-
@Input() loop: any;
166-
167-
/**
168-
* @input {number} The slide index to start on
169-
*/
170-
@Input() index: any;
171-
172-
/**
173-
* @input {boolean} whether the slides should bounce
174-
*/
175-
@Input() bounce: any;
176-
177156
/**
178157
* @input {boolean} Whether the slide should show the page or not
179158
*/
180159
@Input() pager: any;
181160

182161
/**
183-
* @input {any} Any additional slider options you want to pass
162+
* @input {any} Any slider options you want to configure, see swiper parameters: http://www.idangero.us/swiper/api/
184163
*/
185164
@Input() options: any;
186165

187166
/**
188167
* @input {number} Whether or not the slider can zoom in or out
189168
*/
190-
@Input() zoom: any;
169+
// @Input() zoom: any;
191170

192171
/**
193172
* @input {number} how long it should take to zoom a slide
194173
*/
195-
@Input() zoomDuration: any;
174+
// @Input() zoomDuration: any;
196175

197176
/**
198177
* @input {number} the max scale an slide can be zoomed
199178
*/
200-
@Input() zoomMax: any;
179+
// @Input() zoomMax: any;
201180

202181
/**
203182
* @output {any} expression to evaluate when a slide has been changed
@@ -234,19 +213,9 @@ export class Slides extends Ion {
234213
}
235214

236215
this.showPager = isTrueProperty(this.pager);
237-
this.loop = isTrueProperty(this.loop);
238-
239-
if (typeof(this.index) != 'undefined') {
240-
this.index = parseInt(this.index);
241-
}
242216

243217
var options = defaults({
244-
loop: this.loop,
245-
initialSlide: this.index,
246218
pagination: '.swiper-pagination',
247-
paginationClickable: true,
248-
lazyLoading: true,
249-
preloadImages: false
250219
}, this.options);
251220

252221
options.onTap = (swiper, e) => {

0 commit comments

Comments
 (0)