angular-sticky
angular-sticky copied to clipboard
Sticky element position don't rerendred on resize
Hi.
I use this code for program usage of angular-sticky and add resize into events. resize
events working, but sticky elemen not rerendered. Only after scroll it fix position:
angular.element($window).bind('scroll resize', function() {
// draw the sticky element through an apply as the event wasn't from Angular
$scope.$apply(function() {
stickyElement.draw();
});
});
Do you have some ideas what wrong?
You could use angular.element(document.body).injector().get('hlStickyElement')(stickyElement).draw()
On my page doesn't recalculate the correct height of the containers, but on your page maybe will work :)
PS: stickyElement I assume that is an Angular Element type already initialised.