Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 29a0d87

Browse files
committed
Add a common issue section
1 parent 100d205 commit 29a0d87

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,24 @@ Slider directive implementation for AngularJS, without any dependencies: [http:/
3232
## Reporting issues
3333
Make sure the report is accompanied by a reproducible demo. The ideal demo is created by forking [our standard jsFiddle](http://jsfiddle.net/cwhgLcjv/), adding your own code and stripping it down to an absolute minimum needed to demonstrate the bug.
3434

35+
## Common issues
36+
### My slider is not rendered correctly on load
37+
If the slider's parent element is not visible during slider initialization, the slider can't know when its parent becomes visible.
38+
For instance, when displaying a slider inside an element which visibility is toggled using ng-show, you need to send an event to force it to redraw when you set your ng-show to true.
39+
40+
Here's an example of `refreshSlider` method that you should call whenever the slider becomes visible.
41+
```js
42+
vm.refreshSlider = function () {
43+
$timeout(function () {
44+
$scope.$broadcast('rzSliderForceRender');
45+
});
46+
};
47+
```
48+
**ng-show-example**: http://jsfiddle.net/3jjye1cL/
49+
50+
**UI-Boostrap tabs example**: http://jsfiddle.net/0f7sd7dw/
51+
52+
3553
## Installation
3654

3755
### NPM

0 commit comments

Comments
 (0)