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

Thumbs Gallery With Two-way Control #66

Open
barbossa opened this issue Jun 8, 2017 · 1 comment
Open

Thumbs Gallery With Two-way Control #66

barbossa opened this issue Jun 8, 2017 · 1 comment

Comments

@barbossa
Copy link

barbossa commented Jun 8, 2017

Hi guys,
Small question, does this directive support Thumbs Gallery from demo http://idangero.us/swiper/demos/?

@najafi-saeed
Copy link

yes. you can use this codes:

<ks-swiper-container swiper="sliderTop" on-ready="onReadyFuncTop(swiper)"   slides-per-view="1">
        <ks-swiper-slide class="swiper-slide" ng-repeat="s in [1,2,3,4,5,6,7,8,9,10,11,12,13,14]">
               <img ng-src="http://api.randomuser.me/portraits/thumb/men/{{s}}.jpg">
        </ks-swiper-slide>
</ks-swiper-container>
        
<ks-swiper-container override-parameters="{'slideToClickedSlide':'true','centeredSlides':'true'}"
             swiper="sliderBottom" on-ready="onReadyFuncBottom(swiper,sliderTop)"  slides-per-view="5">
        <ks-swiper-slide class="swiper-slide" ng-repeat="s in [1,2,3,4,5,6,7,8,9,10,11,12,13,14]">
               <img ng-src="http://api.randomuser.me/portraits/thumb/men/{{s}}.jpg">
        </ks-swiper-slide>
</ks-swiper-container>

and js in your controller:

$scope.sliderTop = {};
$scope.sliderBottom = {};

$scope.onReadyFuncTop = function(swiper_param) {
      // nothing
};
$scope.onReadyFuncBottom = function(swiper1param , swiper2param) {
    swiper1param.controller.control = swiper2param;
    swiper2param.controller.control = swiper1param;
};

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

No branches or pull requests

2 participants