What is $ scope.answer?

6

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

    
asked by anonymous 14.10.2015 / 15:13

1 answer

5

$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.

    
14.10.2015 / 15:17