What is the difference between $watch and $observe?
Answer / 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 |
How can you handle errors in angular 2 applications?
What is the difference between angularjs 1(angularjs) and angular 2/4?
What is the new in angular 7?
What is cross site script inclusion (xssi)?
What do you mean by module in angular 2?
Explain the component directory structure of angular 4?
What are the new features in angular 4?
What is aot and jit in angular?
Why should use angular js?
What do you understand by $watch?
What is tree shaking in angular?
What is traceur compiler? Why in angular 2?