I have been start learning AngularJS 1.4.7 and I can't understand completely the $scope variables. Is this a variable inside a Angular controller "like" public variables inside a PHP class?
For example:
I have 2 functions function1(), function2() in HomeCtrl.js and a $scope.img = null; variable, and 2 ng-click event in template file to call these functions.
On ng-cick event i call the function1 and set the value of $scope.url to somethig
Thereafter i call the function2 and console.log($.scope.url) it retutn null. Null is the initialized value of this varaiable.
I'v just set the value of $scope.url in function1 and inside function2 value of variabel is null, why?
I have no idea why happening this.