Having just embarked on my AngularJS journey, I'm currently facing an issue with this specific code snippet.
The following is an excerpt from my JavaScript file named cribsController.js:
angular
.module('ngCribs')
.controller('cribsController', function($scope) {
$scope.hello = 'Hello world!';
});
Below is my HTML structure:
<html>
<head>
<meta charset="utf-8" />
<title>ng-cribs</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
</head>
<body ng-app="ngCribs" ng-controller="cribsController">
<h1>{{hello}}</h1>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.2/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/1.2.5/ui-bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/1.2.5/ui-bootstrap-tpls.min.js"></script>
<script src="app.js"></script>
<script src="scripts/cribsController.js"></script>
Upon viewing the HTML file, I am not seeing "Hello World!" as expected, instead, {{hello}} is displayed.
What could be the possible mistake in my setup?