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

Slider pager click #785

Closed
D3CK3R opened this issue Mar 13, 2014 · 7 comments
Closed

Slider pager click #785

D3CK3R opened this issue Mar 13, 2014 · 7 comments
Milestone

Comments

@D3CK3R
Copy link

D3CK3R commented Mar 13, 2014

It would be nice to enable a page click handler per attribute here.
The pager works great on mobile but on desktop or web the user tries to click on the pager to change the slide.

Currently we have to implement a custom pager and disable the automatic one.

@D3CK3R
Copy link
Author

D3CK3R commented Mar 20, 2014

Any chance to get this in the next days? :-)

@D3CK3R
Copy link
Author

D3CK3R commented Mar 23, 2014

I wrote a little dirty script to temporary add click support until this feature is ready.
I noticed that the .slider-pager element doesn't get removed completely. When navigating through the app, the container (.slider-pager) of the pager is kept in the DOM. Only the the children are removed so i have to check if the container is empty when adding the click events:

// Add pager click events (just a temporary fix)
                var initPagerClick = function(){
                    $timeout.cancel(initPagerClick);
                    var pager = document.querySelectorAll('.slider-pager');
                    if(pager.length>0){
                        angular.forEach(pager,function(page, key){
                            if(page.children.length>0){
                                angular.forEach(page.children,function(element,key){
                                    element = angular.element(element);
                                    element.attr('index',key);
                                    element.bind('click',function(e){
                                        scope.$ionicSlideBoxController.slide(parseInt(e.currentTarget.attributes['index'].value),250);
                                    })
                                });
                            }
                        })
                    }
                }
                $timeout(initPagerClick,300);

@jkummer
Copy link

jkummer commented Apr 2, 2014

Good point!
Wood be nice to have for me too.
Is there any solution?

@ajoslin
Copy link
Contributor

ajoslin commented Apr 2, 2014

Hi @D3CK3R ! sorry for not responding sooner, we got busy with pushing beta.1 out.

This is definitely a thing that can happen, we'll implement it soon.

@ajoslin ajoslin assigned ajoslin and unassigned mlynch Apr 2, 2014
@D3CK3R
Copy link
Author

D3CK3R commented Apr 3, 2014

Hey Andy, nice to hear :-) ... thx for the feedback

@D3CK3R
Copy link
Author

D3CK3R commented Apr 7, 2014

Hey Andy ... any plans when the feature will be implemented? Thanks for any reply :-)

@ajoslin ajoslin closed this as completed in d6c960c Apr 7, 2014
@ionitron-bot
Copy link

ionitron-bot bot commented Sep 6, 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 6, 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

5 participants