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

swiper.autoplay.start() seems to be missing from v7 Angular API? #4865

Closed
5 of 6 tasks
spicemix opened this issue Aug 26, 2021 · 2 comments
Closed
5 of 6 tasks

swiper.autoplay.start() seems to be missing from v7 Angular API? #4865

spicemix opened this issue Aug 26, 2021 · 2 comments
Labels

Comments

@spicemix
Copy link

spicemix commented Aug 26, 2021

Check that this is really a bug

  • I confirm

Reproduction link

http://yes.i.know/go.ahead/lock.the.report

Bug description

Debugger shows swiper.autoplay.start() has been renamed swiper.autoplay.run() in v.7 but the docs still say start() and the typescript types for AutoplayMethods still say start() but errors result

Screen Shot 2021-08-25 at 6 31 37 PM

unless you do something like

 (this.swiper.autoplay as any).run();

after which the errors stop, at least, and a single slide autoplays...but it doesn't keep on playing. So my guess is the start() method is now simply missing, somehow...I see the rest of the methods in the debugger including stop() but no start().

Screen Shot 2021-08-25 at 6 17 30 PM

I am using Ionic 6 beta 4 and Angular 12...maybe the Ionic library is snipping off start() somehow?

Screen Shot 2021-08-25 at 6 18 49 PM

Anyway putting this out there as I will have to roll back to Swiper 6 otherwise.

Swiper version

7.0.0

Platform/Target and Browser Versions

Angular 12

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@spicemix spicemix changed the title swiper.autoplay.start() renamed swiper.autoplay.run() but not in types or docs swiper.autoplay.start() seems to be missing from API? Aug 26, 2021
@spicemix
Copy link
Author

Actually it looks like the Angular setup isn't working at all in v7 for me, can't manually swipe slides either. But the missing swiper.autoplay.start() is the only error reported in Chrome debugger as such. If you leave this issue open I can recount how I got it working for your other users, which is more important to open source than github issue sanitation. (Assume I backed out to v6 if I'm not allowed to update this report)

@spicemix spicemix changed the title swiper.autoplay.start() seems to be missing from API? swiper.autoplay.start() seems to be missing from v7 Angular API? Aug 26, 2021
@spicemix
Copy link
Author

spicemix commented Aug 26, 2021

OK I'm backing out to v.6 as I can't get v.7 Angular working at all. If anyone has any luck please let us know if the report is still open for you to do so. It seems the angular implementation is still using things that are deprecated in the main v.7 (e.g. SwiperCore.use(...)) so it's probably too early to migrate.

(Confirming: The exact same code works flawlessly in 6.8.4. I am fully updated on all other dependencies, Angular 12.2.3, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant