ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.1k stars 13.51k forks source link

ionic angular4.1.2 Place multiple < ion-slides > pages to find bugs #17859

Closed lccWEBApp closed 5 years ago

lccWEBApp commented 5 years ago

Description:

Steps to Reproduce:

When two < ion-slides > slides are placed on the page, even if I bind one of them (ionSlide DidChange), rolling any one of them will execute (ionSlide DidChange). Please improve this problem.

Output:

My ionic info:


<paste here>
```Ionic:

   ionic (Ionic CLI)             : 4.10.2 (D:\npmConfig\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.1.2
   @angular-devkit/build-angular : 0.13.5
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.3.5
   @ionic/angular-toolkit        : 1.4.0

Cordova:

   cordova (Cordova CLI) : 7.1.0
   Cordova Platforms     : android 6.4.0
   Cordova Plugins       : not available

**Other Information:**
<!--
e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links,
forum links, etc
-->
lccWEBApp commented 5 years ago

Question additions: Placing multiple < ion-slides > on the page only sets the method on one < ion-slides > while scrolling the other < ion-slides > without the method will still trigger the method, which is very painful. such as:(ionSlideDidChange) (ionSlideNextEnd) (ionSlideNextStart).....

liamdebeasi commented 5 years ago

Hi there,

Thanks for the issue. Can you provide a repository with the code required to reproduce this issue?

Thanks!

lccWEBApp commented 5 years ago

嗨,您好,

谢谢你的问题。您是否可以提供存储库以及重现此问题所需的代码?

谢谢!

My program HTML

qqq

When I Slide either of the two clocks (ionSlideDidChange)="onSlideDidChange()" trigger,But the secondNo (ionSlideDidChange) Slide same trigger onSlideDidChange(),This is a headache

liamdebeasi commented 5 years ago

Hi there,

Thanks for the follow up. Unfortunately, a sceenshot of your HTML does not give me a lot of insight into how your application is set up. It would be great if you could post a repository with a basic application that shows this bug happening.

Thanks!

lccWEBApp commented 5 years ago

嗨,您好,

感谢您的跟进。不幸的是,HTML的一个场景并没有让我对你的应用程序的设置方式有很多了解。如果您可以使用显示此错误的基本应用程序发布存储库,那将是很棒的。

谢谢!

Hello!My program did not report errors So let me ask from a different angle. When my HTML Above Placed Two As shown below image

The cause of my headache Scroll one of them ionSlideDidChange Triggered twice,Please help me to answer the correct way to use it.

liamdebeasi commented 5 years ago

Hi there,

Can you post the contents of the TypeScript .ts file for this page?

Thanks!

lccWEBApp commented 5 years ago

嗨,您好,

你可以发布.ts这个页面的TypeScript 文件的内容吗?

谢谢!

Here's mine ts

4545455 Red marking Only in one. binding Not monitored It also triggers ionSlideDidChange
Can't I have more than two < ion-slides > on my HTML?

liamdebeasi commented 5 years ago

Hi there,

Thanks for the follow up. I am still unable to reproduce the issue you are seeing. When I slide the first slider, the onSlideDidChange method is called like I would expect. Sliding the second slider does not call onSlideDidChange as I would expect as well.

Like I mentioned previously, a full reproduction of the bug (via a GitHub repo) you are seeing would be very useful. Otherwise, the help I am able to give will be limited.

In regards to your last point, you can have more than one ion-slides on a page. I would also recommend double checking your code to ensure things were implemented properly.

Thanks!

lccWEBApp commented 5 years ago

嗨,您好,

感谢您的跟进。我仍然无法重现您所看到的问题。当我滑动第一个滑块时,该onSlideDidChange方法被调用,就像我期望的那样。滑动第二个滑块不会onSlideDidChange像我期望的那样调用。

就像我之前提到的,你看到的bug(通过GitHub repo)的完整复制将非常有用。否则,我能给予的帮助将是有限的。

关于你的最后一点,你可以ion-slides在一个页面上有多个。我还建议仔细检查您的代码,以确保正确实施。

谢谢!

Thank you for your patient explanation. I reviewed my code again. The problem arises as follows HTML

image

TS image

When I slide id="slides1" id="slides2" Will trigger id="father" ionSlideDidChange, My program is Nested

liamdebeasi commented 5 years ago

Hi there,

Thanks for the update. We do not currently support nested ion-slides.

I am going to close this, but if you would like to see this in a future version of Ionic, feel free to open a Feature Request.

Thanks for using Ionic!

ionitron-bot[bot] commented 5 years ago

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.