Module loading test

by digitalzebra

HTML

<div ng-app="foobar">
    <div ng-controller="test">
        {{ ruhroh }}
    </div>
</div>

JavaScript

angular.module("foobar", ["aModule"]);
angular.module("aModule", []).value("testVal", "scooby doo");

angular.module("foobar").controller("test", function($scope, testVal) {
   $scope.ruhroh = testVal; 
});