5

I'm using Angular-Bootstrap Carousel directive and making some changes on top of it. The Carousel had ng-repeat for the slides.

I'm trying to get to the next/previous slide by hovering the right/left controls instead of by click. And achieving that by changing the object.active state (previous to false - new to true)

Anyway after a few rounds, all my objects are active=false and the carousel displays nothing. After debugging the array and $watch on each object I found that when it goes wrong, is because the directive somehow changes the active=false when I don't expect it to.

Long story short: Can I somehow get the call stack of an object in the scope I'm watching using $watch ?

My watch code is for instance the following:

$scope.$watch('requestFilters[0]', function(obj) {
    console.log('Item 0 changed');
}, true);
JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
AlexD
  • 4,062
  • 5
  • 38
  • 65
  • any luck on this? I also have a similar requirement. "Can I somehow get the call stack of an object in the scope I'm watching using $watch ?" – helloworld Oct 14 '15 at 06:40
  • Duplicate of http://stackoverflow.com/questions/20508197/how-to-find-the-call-site-that-changed-an-object-being-watched – peoplespete Dec 08 '15 at 18:03

0 Answers0