asafdav / ng-scrollbar

A custom scrollbar written in pure AngularJS
MIT License
187 stars 70 forks source link

Impossible to build the scroll in a modal #27

Closed vianney35 closed 9 years ago

vianney35 commented 10 years ago

Hi,

I want to use ng-scrollbar inside a angular UI modal. On the promise "opened" of the modal, I rebuild the scrollbar using $scope.$broadcast('rebuild:me'); but the scrollbar is not rebuild.

However, if I resize my windows (and using the property rebuild-on-resize), it work.

bneiluj commented 9 years ago

I'm having the same issue.

asafdav commented 9 years ago

Hi guys,

Could one of you please post a plunker I can play with ?

ghoullier commented 9 years ago

I've the same problem. plunker

asafdav commented 9 years ago

http://plnkr.co/edit/tJVwob7iHguxtXBket4m?p=preview

ghoullier commented 9 years ago

OK, this solution works but it doesn't explain why promise way fail...

asafdav commented 9 years ago

Probably ui-model resolves the promise before the view is actually rendered.