Comments (2)
Each slider has it's own isolated scope, so this can be a bit of a challenge.
You could create an event when the slider slides, and emit an event with the current index. Then a event listener can invoke a .slideTo to the other slider with the passed index.
You could a bind it to the onSlideChangeEnd
event, and transition the opposite slider.
Possible ideas, not sure how perfectly sync it would be however.
from angular-swiper.
In order to achieve this, I had to add the swiper_uuid to the swiper instance:
$timeout(function() {
var swiper = null;
if (angular.isObject($scope.swiper)) {
$scope.swiper = new Swiper($element[0].firstChild, params);
swiper = $scope.swiper;
} else {
swiper = new Swiper($element[0].firstChild, params);
}
swiper.swiper_uuid = $scope.swiper_uuid; //<--add uuid to swiper instance
console.log(swiper.swiper_uuid);
//If specified, calls this function when the swiper object is available
if (!angular.isUndefined($scope.onReady)) {
$scope.onReady({
swiper: swiper
});
}
});
I'll try to make a pull request soon
from angular-swiper.
Related Issues (20)
- Used Swipe fix for ng-repeat, now it always loads to the last slide HOT 1
- Can't pass slides-per-view auto param HOT 1
- Responsive slider HOT 1
- Can't apply changes when I add or remove slides from array HOT 3
- how to stop autoplay? HOT 1
- Breakpoints Issue HOT 1
- Lazy loading images HOT 2
- Parallax example
- Thumbs Gallery With Two-way Control HOT 1
- Zoom
- How to modify bullet HOT 1
- Slide with ng-if or ng-show HOT 1
- Issue with build production for angular 4 HOT 2
- Swiper 4.x support HOT 1
- Angular swiper does not work without browser resize HOT 3
- Duplicate slides are not rendered by Angular
- Autoplay stops on interaction HOT 1
- Minified files and injecting depencies
- Angular Thumbs Gallery
- RTL Compliance on the Slides
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-swiper.