Simple Angular App Revised - Updating the simple angular app to use the app, module and controllers architecture is rather straightforward:
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
<script src="simple_angular.js"></script>
<meta charset="utf-8">
<title>Angular binding test</title>
</head>
<body ng-controller="myController">
<input ng-model="myInput" />
<h1>Hello {{myInput}}</h1>
</body>
</html>
Where simple_angular.js incudes the Angular module, the controller and scope as shown
below:
var app = angular.module("myApp", []);
app.controller("myController", function($scope) {
$scope.myInput = "world!";
});
Link to see it working is here.