This repository has been archived by the owner on May 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 159
Not working with AngularJS #64
Comments
Any headway here? I am also stuck here. |
The problem might be that you call HTML: <div id="slider">
<img ng-repeat="slide in sliderCtrl.slides" src="{{slide.src}}" alt="{{slide.alt}}" />
</div> JS: .controller('SliderController', SliderController);
function SliderController() {
var vm = this;
activate();
function activate() {
$scope.$on('$viewContentLoaded', function() {
$timeout(function() {
var slider = new IdealImageSlider.Slider({
selector: '#slider',
...
});
slider.start();
});
});
}
} |
Same problem here. Any solutions? |
What have you tried? |
I tried listening to the viewContentLoaded event but it didn't work. |
Simply running inside a timeout solved it for me...
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have dynamic list of images created by a AngularJS controller. After calling var slider = new IdealImageSlider.Slider('#slider'); the will be cleared and no img element is set. If I remove the constructor all images show up fine.
The text was updated successfully, but these errors were encountered: