Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why $scope is used in angularjs?

826


What are template expressions in angular?

846


What are the features of angular 2 service?

766


What is injector?

806


Can't bind to ngmodel since it isn't a known property of input angular?

910


What is aot in angular?

775


What are the features of angularjs?

773


What is a decorator function?

762


What is another word for module?

679


What are the differences between @component and @directive?

904


Which directive is used to hide elements from the html dom by removing them from that dom and not changing their styling?

786


What is the use of a double-click event in angularjs?

813


Why is lazy evaluation good?

730


Explain ngfor directive with an example?

800


How angular protects us from xss attacks?

895