What is the difference between $watch and $observe?
Answer Posted / chaitanya
$watch is a method on the scope object which is used to watch expressions. The expression can be either strings or functions.
$observe is a method on the attrs object which is only used to observe the value change of a DOM attribute. It is only used inside directives.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is ngonchanges in angular 2?
Does apple use angular?
What is primeng in angular?
Explain $q service, deferred and promises.
What is elementref in angular 4?
How did you reverse a string?
What is an oauth token?
What the link function is and how it differs from compile?
What is angular cli command?
How to display images based on the status(a, b, and c) in angular js?
What is pipe in angular?
What is ngoninit in angular?
What is a controller javascript?
What would be a good use for ngzone service?
What do you understand by linking function? Explain its type.