I'm new to AngularJS, I would like to understand what the $ scope.answer really is for, I did not find anything in the official documentation or the web, I just saw it in an example I took in a tutorial, but I did not understand the importance of it
I'm new to AngularJS, I would like to understand what the $ scope.answer really is for, I did not find anything in the official documentation or the web, I just saw it in an example I took in a tutorial, but I did not understand the importance of it
$scope
is an object that references the application template that provides a running context for applications - different contexts have a $scope
different.
A $scope
can be shared between hierarchical structures (parent-child controls), as well as propagate events.
$scope.answer
is probably just a variable created in the execution scope. It does not belong to the default implementation of Angular.