AngularJS controller with output



examples/angular/hello_world_controller.html
<script src="angular.min.js"></script>
<script src="hello_world_controller.js"></script>
<div ng-app="HelloWorldApp">
    <div ng-controller="HelloWorldController">
        <h1>{{greeting}}</h1>
    </div>
</div>

examples/angular/hello_world_controller.js
angular.module('HelloWorldApp', [])
   .controller('HelloWorldController', ['$scope', function($scope) {
       $scope.greeting = "Hello World";
}]);