Okay, so here is a sample hello world code from the angularjs homepage:
<!doctype html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js"></script>
</head>
<body>
<div>
<label>Name:</label>
<input type="text" ng-model="yourName" placeholder="Enter a name here">
<hr>
<h1>Hello {{yourName}}!</h1>
</div>
</body>
</html>
Now, this model variable yourName
must have been created somewhere (in some scope), and it certainly can't be accessed using:
<script>
console.log(yourName);
</script>
How can we access this variable, WITHOUT creating a module and assigning a controller to it, and then accessing it using $scope.yourName
Not that this is a requirement, but I certainly need it to clear some concepts.