From fc9832c57ade5abd4c292ca4d44c78e315df1ccf Mon Sep 17 00:00:00 2001 From: Eric James Date: Tue, 20 Sep 2016 14:12:24 -0400 Subject: [PATCH] $timeout needed to reinitialize DOM element --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 42ad543..5cca8ea 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,8 @@ as shown in the example. ``` ## Slide data -For change slide content, you have to set `ng-if` to destroy and init it +For change slide content, you have to set `ng-if` to destroy and init it. +$timeout is required to re-init slideshow to trigger digest cycle. - controller: ```js @@ -129,8 +130,9 @@ For change slide content, you have to set `ng-if` to destroy and init it $scope.numberLoaded = false; // disable slick //number update - - $scope.numberLoaded = true; // enable slick + $timeout(function() { + $scope.numberLoaded = true; // enable slick + }); }; ``` - html: