Check out this link for more information.
For a working version, visit: this site.
The issue here is that Angular is calculating the width of the slider when the directive is processed, but since the item is not visible, it has no width. The labels on the slider are customizable, so it may not always be "On/Off". This means that the width of the slider needs to be flexible.
Do you think it's possible to adjust the CSS of the slider to prevent the need for width calculations?