As a newcomer to AngularJS, I decided to experiment with some basic code. However, the results were not as expected. Here is the HTML code that I used:
<!DOCTYPE html>
<html ng-app>
<head>
<script src="js/angular.min.js"></script>
<script>
function MyFirstCtrl($scope) {
var employees = ['Jon Doe', 'Abe Lincoln', 'Hugh Grant'];
$scope.ourEmployees = employees;
}
</script>
</head>
<body ng-controller='MyFirstCtrl'>
<h2>Number of Employees: {{ourEmployees.length}}</h2>
</body>
</html>
Although I anticipated the output to be Number of Employees: 3, both Firefox and Edge browsers displayed Number of Employees: {{ourEmployees.length}}. Since other simple codes worked fine, it suggests that the issue doesn't lie with the reference to the angular.min.js file.
Your help would be greatly appreciated.