diff --git a/js/angular/directive/slideBox.js b/js/angular/directive/slideBox.js
index f216b690cf5..7c0eb4b2383 100644
--- a/js/angular/directive/slideBox.js
+++ b/js/angular/directive/slideBox.js
@@ -133,12 +133,20 @@ function($timeout, $compile, $ionicSlideBoxDelegate, $ionicHistory) {
'',
link: function($scope, $element, $attr, slideBoxCtrl) {
- // If the pager should show, append it to the slide box
- if ($scope.$eval($scope.showPager) !== false) {
- var childScope = $scope.$new();
- var pager = jqLite('');
- $element.append(pager);
- $compile(pager)(childScope);
+ $attr.$observe('showPager', function(show) {
+ show = $scope.$eval(show);
+ getPager().toggleClass('hide', !show);
+ });
+
+ var pager;
+ function getPager() {
+ if (!pager) {
+ var childScope = $scope.$new();
+ pager = jqLite('');
+ $element.append(pager);
+ pager = $compile(pager)(childScope);
+ }
+ return pager;
}
}
};
diff --git a/test/html/slideBox.html b/test/html/slideBox.html
index 31740aebbad..cfaf2f7e29a 100644
--- a/test/html/slideBox.html
+++ b/test/html/slideBox.html
@@ -41,13 +41,13 @@
}
-
+
-
+
Thank you for choosing the Awesome App!