Sticky-kit doesn't work with Angular
N-Nagorny opened this issue · 2 comments
Hi, all.
This jQuery plugin is really great but for some reason I can't use it in an existing Angular project. I installed it with npm
, added to the scripts
array of angular.json
and added debug print-outs to understand what's going on.
The result is that it founds a needed element but after going through the list of them there's no recalc()
calls or sticky_kit:stick
events even if I specified recalculation per each second in the options.
Does anybody know what can be the reason of this behavior? Maybe, there's a tutorial how to add such scripts to an Angular projects?
Thanks in advance.
I figured out that if I call stick_in_parent()
for a <div>
in the main component, it works, but it doesn't for a <div>
in the header component which is included in the main one with <app-header>
selector.
parent: $("app-root")
helped me. The issue can be closed.