I recently developed a simple program using AngularJS and included the minified AngularJS in the script tag. However, I am encountering an issue where the browser is unable to parse the AngularJS code. Strangely, I have other programs with similar code that are functioning properly.
Could I be missing or overlooking something?
Example of MVC Architecture
<!DOCTYPE html>
<html ng-app>
<head>
<title>MVC Example</title>
<script src="js/angular.min.js"></script>
<script>
function MyFirstCtrl($scope) {
var employees = ['Catherine Grant', 'Monica Grant', 'Christopher Grant', 'Jennifer Grant'];
$scope.ourEmployees = employees;
}
</script>
</head>
<body ng-controller='MyFirstCtrl'>
<h2>Number of Employees: {{ourEmployees.length}}</h2>
</body>
</html>
Expected Browser Output:
Number of Employees: {{ourEmployees.length}}