I'm currently working on developing an application using the MEAN stack. Here is a snippet of my controller code:
var myApp = angular.module('myApp',[]);
myApp.controller('AppCtrl',['$scope', '$http', function($scope, $http){
console.log("Hello World from console");
}])();
Here's a glimpse of what my index.html file looks like:
<!DOCTYPE>
<html>
<head>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<title>
Contact List App</title>
</head>
<script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<script scr = "controllers/controller.js"></script>
<body ng-app = "myApp">
<div class = "container" ng-controller = "AppCtrl">
<h1>Contact List App</h1>
<table class= "table">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Number</th>
</tr>
</thead>
</table>
</div>
</body>
</html>
I am encountering an error: [$injector:modulerr] If anyone has encountered this issue before, I would greatly appreciate your help.