I'm having some trouble with a basic example. I have two files, index.html and main.js, both located in the same folder:
<!DOCTYPE html>
<html>
<head>
<title> AngularJS Tutorials </title>
<link rel="stylesheet" href="css/foundation.min.css">
<script src="main.js"></script>
</head>
<body>
<div ng-app="myApp">
<div ng-controller="FirstCtrl">
<h1>{{data.message}}</h1>
</div>
</div>
<script type="text/javascript" src="js/angular.min.js"></script>
</body>
</html>
Main.js contains the following code:
function FirstCtrl($scope) {
$scope.data = {message: "Hello"};
}
But when I view my page, all I see is this:
{{data.message}}