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 |
What do you understand by metadata in context of angular 2 application?
What is an ng model?
Does angular use ajax?
What is eventemitter in angular?
What is cross site script inclusion (xssi)?
How $location is different from window.location in angularjs?
What is service method?
What is routerstatesnapshot?
What is the use of @Input and @Output?
What are the types of linking function?
What is in angular url?
What is the purpose of tsconfig.json in angularjs?