$watch keeps track of a variable and its value <div ng-controller="mycontroller"> <input ng-model="a"> <div> {{ b }}</div> </div> app.controller('mycontroller',function(){ $scope.a=1; $scope.b=2; }) whenever a databinding with the scope variable is created , a $watch will automatically be created by the angular js framework $watch -a:1 and $watch -b:2, And this will be used by the digest cycle . Since C is not used in any databinding , so $watch is not created for variable c. If the value gets changes for those variable, angular performs necessary updates to the DOM elements With the help pg $watch custom functions can be created which are called $watchListeners and this gets executed as soon a the value of the variables is changed They are mainly used for databinding and angular Js constantly uses watchers behind the scene number of watchers should be kept less the 2000 There are number of ways to get...
What is Abstract class? -------------------------------------------------------------- The abstract keyword enables you to create classes and class members solely for the purpose of inheritance—to define features of derived, non-abstract classes A Sealed class -------------------------------------------------------------- It cannot be used as an abstract class as it cannot be used as a base class .A class member,method field,property or event on a derived class that is overriding a virtual member of the base class can declare that member as sealed class.This will prevent that method from being overriden in further derivation. This can be accomblished bu putting the sealed Keyword before the overridde keyword in the class member declaration. Polymorphism : -------------------------------------------------------------- C# recognises the method by its parameters and not only by its name.The return type of a method is never the part of the method signature if the nam...
Comments
Post a Comment