I am trying to dynamically create AngularJS modules, and here is what I have so far:
<section class="panel portlet-item" id="crashpanel"></section>
<script type="text/javascript">
var angularApp = angular.module("Crashpanel", []);
angularApp.controller("CrashpanelCtrl", function ($scope, $http, $compile)
{
console.log("Hello");
});
angular.bootstrap(angular.element("#crashpanel"), [ "Crashpanel" ]);
</script>
However, the "Hello" message is not being displayed because the controller is not attached to the element. How can I properly attach the controller to the element?