Contents tagged with directive

  • Notes about AngularJS webinar

    Hello everybody,

    few notes about some details of AngularJS.

    1. What is $scope?

    $scope is something where we can store information which is needed for page. Also data for changes of which we need to track.

    2. How can we react on some changes in $scope? In other words if something at page modified something in model, how can we react on it? Or in another words, how to track changes in some member? 

    Imagine following scenario. Inside of your scope there is a member message like this:

    $scope.message = "Your message";

    You can track it like this:

    $scope.$watch("message", function(newValue, oldValue) {

        //here you can do something


    newValue as you probaly guessed is new value, … more