I am beginner in AngularJS, so I try to run basic code. However, this simple code does not work in a way I want. The html code is the following:
<!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>
I'd expect that the correct result is Number of Employees: 3 Instead of this, the browser (both Firefox and Edge) shows the following: Number of Employees: {{ourEmployees.length}}. Since other simple codes did work, the problem is surely not the reference to the angular.min.js file.
Thanks in advance.