AngularJS : Difference Between The Observe And Observeandwatch Methods
Answer : $observe() is a method on the Attributes object, and as such, it can only be used to observe/watch the value change of a DOM attribute. It is only used/called inside directives. Use $observe when you need to observe/watch a DOM attribute that contains interpolation (i.e., {{}}'s). E.g., attr1="Name: {{name}}" , then in a directive: attrs.$observe('attr1', ...) . (If you try scope.$watch(attrs.attr1, ...) it won't work because of the {{}}s -- you'll get undefined .) Use $watch for everything else. $watch() is more complicated. It can observe/watch an "expression", where the expression can be either a function or a string. If the expression is a string, it is p a r s e ′ d ( i . e . , e v a l u a t e d a s a n A n g u l a r e x p r e s s i o n ) i n t o a f u n c t i o n . ( I t i s t h i s f u n c t i o n t h a t i s c a l l e d e v e r y d i g e s t c y c l e . ) T h e s t r i n g e x p r e s s i o n c a n n o t c o n t a ...