0

I'm reading this book on angularJS and was trying the following example:

        <!DOCTYPE html>
     <html ng-app>
<head>
    <title>Listing 2-1</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>

But wen I run it, I get this:

Number of Employees: {{ ourEmployees.length }}

What am I doing wrong?

David
  • 57
  • 1
  • 6

0 Answers0