How do I know what causes $ watch to run a scope variable?

I have many input fields (this is a selection field) that can be set in various ways. One of them has several static options (all lines), and after it is set to the corresponding line, it is inexplicably set to 200. (My only guess about where this comes from is some HTTP status code or something like that.)

I see this by adding $ watch for the scope variable.

I know this is a vague question and I am happy to provide more detailed information, but I'm not sure it would be helpful. But is there any way to debug where this comes from? After the clock is running, stack tracing is not very useful (just go to the angular $ digest function) and onReadyStateChange.

+4
source share

All Articles