Ionic-framework: Feature request: Swiper RC5 - initialize Swiper instance with options in ts?

Created on 21 Jan 2017  路  3Comments  路  Source: ionic-team/ionic-framework

Ionic version: (check one with "x")
[x] 2.x

I'm submitting a ... (check one with "x")
[x] feature request

Current behavior:
Before RC5, I used to have mySlideOptions variable and used it to initialise the swiper in the HTML file like this:
<ion-slides [options]="mySlideOptions">

Requested behavior:
Now [options] has been removed. Is there a way to initialise the Swiper instance in the TS file and then used it in HTML?

As it is shown on this link: https://github.com/nolimits4web/Swiper/blob/master/demos/04-space-between.html
Swiper instance is initialized in the js part and then used in html. This would allow us to instantiate Swiper and configure it with some options.

    var swiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        paginationClickable: true,
        spaceBetween: 30,
    });
reply

Most helpful comment

Thanks for the issue! Take a look at the Advanced section (on the nightly docs) for Slides: http://ionicframework.com/docs/v2/nightly/api/components/slides/Slides/#advanced

Is this what you're looking for? :smile:

All 3 comments

Thanks for the issue! Take a look at the Advanced section (on the nightly docs) for Slides: http://ionicframework.com/docs/v2/nightly/api/components/slides/Slides/#advanced

Is this what you're looking for? :smile:

That's perfect. It's working again. Thanks Brandy =)

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fdnhkj picture fdnhkj  路  3Comments

manucorporat picture manucorporat  路  3Comments

giammaleoni picture giammaleoni  路  3Comments

brandyscarney picture brandyscarney  路  3Comments

Nick-The-Uncharted picture Nick-The-Uncharted  路  3Comments