Comments (9)
you can easily create your own indicator :
<ul rn-carousel rn-carousel-index="index"><li ng-repeat="item in items">...</li></ul>
<div>{{ index }} / {{ items.length }}</div>
any other idea ?
from angular-carousel.
I saw this at source:
template: '<div class="rn-carousel-indicator">' +
'<span ng-repeat="item in items" ng-class="{active: $index==$parent.index}">●</span>' +
'</div>'
so I wonder why not support lable before the ●
image
text -----------> ●●●
from angular-carousel.
I put my own symbol directly on the source.
There is a way to navigate the gallery from indicator?
from angular-carousel.
@ManuelColombo you mean when you click an indicator to switch to given slide ?
from angular-carousel.
@revolunet yes I mean exactly what you said
from angular-carousel.
I modified the min.js this way
`template:'
•
Within ng-click I assign to $parent.index the clicked one's value, it changes my index and move the active bull but doesn't affect the picture.
In my gallery I've two arrow (prev and next) enabled or disabled according to the index of the rn-carousel-index variable. The code in ng-click affect those arrow but not my images.
from angular-carousel.
i should implement directive controller pattern
from angular-carousel.
@revolunet, @ManuelColombo
hi, to write a custom indicator, you may want to override the template of "rnCarouselIndicators" & write your own CSS.
To make the indicator become a real "navigator". you can access parent scope of the directive's scope and pay attention to "goToIndex" function of carouselCollection (managed by carouselmanager).
here's a working piece of code
.directive('rnCarouselIndicators', [function() {
.......
template:
link: function(scope, element, attrs, model) {
scope.goToIndex = function(index, bool){
scope.$parent.carouselCollection.goToIndex(index, bool);
};
console.log();
}
};
}]);
if there's something to improve, that's the animation, currently it's quite laggy compared to bootstrap carousel (via angular directive).
Since my carousel has too many slides, I switch to this carousel to take advantage of "buffered" functionality to prevent rendering overhead.
from angular-carousel.
Hi guys, FYI, a new refactored version has been pushed, and support clickable indicators.
There's a demo with custom controls and thumbnail navigation...
So basically, for a custom indicator you just need to bind the rn-carousel-index
:)
from angular-carousel.
Related Issues (20)
- Problem with img selector
- Any one else having issue with minification
- RTL Support HOT 3
- Cannot read property 'lenght'of null in currentSlides.lenght HOT 2
- Error: Unknown provider: $intervalProvider <- $interval <- rnCarouselDirective
- Suggested improvement for rnCarouselIndicators HOT 1
- ng-style with background image HOT 2
- Is this a working plugin after all? HOT 5
- rn-carousel-controls doesn't present controls
- Multiple image slides, move one image slide at a time HOT 1
- carousel.index does not change
- Carousel inside carousel? (nesting) HOT 1
- Slides loading below each other for half a second HOT 1
- binding next/previous to left and right keys
- Custom Template for Controls
- display Multiple item but move multiple item at a time
- CDN is not working for me..
- Big data multi-item works very slowly ~ 800 items in 15 carousels HOT 2
- Can't copy text from slider
- angular-carousel conflict with ng-touch module from angular-material
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-carousel.