Comments (2)
Hi,
You just need to use one of the built in option in this directive, it`s written here in github:
For initialization carousel after data is loaded use init-onload property. Example:
> <slick init-onload=true data="awesomeThings">
> ...
> </slick>
so, just write the correct name of your scope in data attribute.
from angular-slick.
From a recent experience, you have to call the slick directive and nested div's in a specific manner.
This slick directive from my experience, doesn't like being the container for your images.
I usually container my directives regardless, but this is how i accomplished something similar.
This scrolls through about 30 images around 1mb apiece, without issue.
Here is an example HTML file for a synced nav using the slick directive.
`
Here is a controller config, but i am extracting it into a service soon.
.controller("ImageCtrl", function image_controller(
$scope,
$timeout,
$stateParams,
$filter,
$http,
$q,
$log) {
console.log("Image Controller loaded");
console.log($stateParams.category);
getImages();
$scope.filter = $stateParams.category;
function getPromiseImages() {
var deferred = $q.defer();
$http.get('/api/images').then(
function handleSuccess(response) {
console.log("Got promise list of images.");
deferred.resolve(response.data);
},
function handleError(response) {
console.log("Promise list of images failed.");
});
return deferred.promise;
}
function getImages(){
getPromiseImages().then(function(data){
$scope.$applyAsync(function(){
console.log(JSON.stringify(data));
$scope.images = data;
});
});
}
});`
from angular-slick.
Related Issues (20)
- Unslick failure
- Can't swipe back with swipe to slide HOT 1
- Slide when number of slide is less than or equal to slides-to-show HOT 2
- Using boolean('false') always returns true HOT 1
- useCSS property does not work
- Bug doesnt display anything until autoplay begins HOT 1
- slides to scroll setting is not working in last page
- As-nav-for is not working with touch.
- Dragging makes my list disappear HOT 3
- angular slick carousel does not respect viewBox of the ng-md-icon
- ng-click on mobile dont work HOT 1
- Can't disable draggable property
- how to ban cycle?
- how to init current-index
- Cannot read property 'add' of null
- slider.unslick is not a function
- Dragend triggers click
- Passing Slick as dependency with ng-route does not load it HOT 2
- $ is not a function
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-slick.