angularjs-scroll-glue icon indicating copy to clipboard operation
angularjs-scroll-glue copied to clipboard

Why watch function calling multiple times???

Open abdheshkumar opened this issue 9 years ago • 2 comments

Hi, I just use your angular directive code for scroll bottom in chat box but i realized watch function calling number of times. According to angular documentation it should be call only two times. so could you tell me why it is calling multiple times?

abdheshkumar avatar Mar 12 '15 13:03 abdheshkumar

scope.$watch should only be called once per scroll-glue tag used in your markup. Can you elaborate with an example?

Luegg avatar Mar 12 '15 17:03 Luegg

@Luegg Thanks for quick reply. No, scope.$watch calling two times when i used it in separate directive(in parent directive). When i used in child directive it's calling multiple times and even calling continuously but parent directive already implemented scope.$watch for some object changes. so it may be happening because of parent directive scope.$watch implementation ?

abdheshkumar avatar Mar 13 '15 05:03 abdheshkumar