Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Slides #5508

Closed
3 of 5 tasks
brandyscarney opened this issue Feb 18, 2016 · 12 comments
Closed
3 of 5 tasks

Improve Slides #5508

brandyscarney opened this issue Feb 18, 2016 · 12 comments
Assignees

Comments

@brandyscarney
Copy link
Member

brandyscarney commented Feb 18, 2016

Known issues:

  • Pager is an attribute - probably want to use the swiper version - options
  • Multiple sliders on one page use the same pagination
  • Improve documentation behind options and methods
  • Remove timeout around create
  • Don't emit slide events when runCallbacks is false
@steveharbick
Copy link

I'm hoping there is (to be documented), or will be (added), a way to access the Swiper API's method: mySwiper.slideTo(index, speed, runCallbacks). This is particularly useful for using slides on first-run and allowing user to skip to end if they want.

@brandyscarney
Copy link
Member Author

@steveharbick There's actually been a PR submitted for this it's just something we need to look into merging. 😄 #5491

@adamdbradley
Copy link
Contributor

Related: #6198

brandyscarney added a commit that referenced this issue Apr 19, 2016
add to docs including how to use the slides and rename methods.

BREAKING CHANGE:

The Slides component has been refactored. Many methods and events were
renamed.

The following events have been renamed:

- `slideChangeStart` has been renamed `willChange`
- `change` has been renamed `didChange`

The following methods have been renamed:

`next()` has been renamed to `slideNext()`
`prev()` has been renamed to `slidePrev()`
`getIndex()` has been renamed to `getActiveIndex()`
`getNumSlides()` has been renamed to `length()`
`isAtEnd()` has been renamed to `isEnd()`
`isAtBeginning()` has been renamed to `isBeginning()`
`getSliderWidget()` has been renamed to `getSlider()`

The following method was added: `slideTo()`

All methods have been documented in the API docs:
http://ionicframework.com/docs/v2/api/components/slides/Slides/

references #5508, references ionic-team/ionic-site#458
brandyscarney added a commit that referenced this issue Apr 19, 2016
brandyscarney added a commit that referenced this issue Apr 20, 2016
Slides added method wrapper: `getPreviousIndex()`

references #5508
@brandyscarney
Copy link
Member Author

So some of the improvements were made. I improved the docs to add a lot more information and document the methods better, these can be seen here: http://ionicframework.com/docs/v2/api/components/slides/Slides/

Please check the changelog for the breaking changes to slides in beta.5: https://github.com/driftyco/ionic/blob/2.0/CHANGELOG.md#200-beta5-2016-04-20

Let me know if you have any feedback on the docs! Going to move this issue to beta.6 to continue work on it.

@davyzhang
Copy link

davyzhang commented Apr 27, 2016

slideTo marked time is an optional parameter, but can not omitted in typescript

    /**
     * Transition to the specified slide.
     *
     * @param {number} index  The index number of the slide.
     * @param {number} speed  Transition duration (in ms). Optional.
     * @param {boolean} runCallbacks  Whether or not to emit the `willChange`/`didChange` events. Optional. Default true.
     */
    slideTo(index: number, speed: number, runCallbacks: boolean): void;

Should it be
slideTo(index: number, speed?: number, runCallbacks?: boolean): void;

?

@ramonornela
Copy link
Contributor

Related: #7422

@brandyscarney
Copy link
Member Author

Closing this since slides have been refactored.

@tmk1991
Copy link

tmk1991 commented Oct 3, 2017

Any update on having multiple sliders on one page?

@btribouillet
Copy link

Any update on having multiple sliders on one page?

Indeed it would be great! I was amazed about this component but it is too bad we can't use multiple sliders on one page.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 2018

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants