I have two angular apps on my page. First one is bootstrapped using the "ng-app" directive that is on the main body. Second app is initialized manually using angular.bootstrap method.
First app that is automatically bootstrapped
<body ng-cloak ng-app="app">
<section id="mainbody">
<div class="container radar-main-container">
@RenderBody()
</div>
</section>
Below is the app.js for the main app
var commonModule = angular.module('common', ['ui.router']);
var appMainModule = angular.module('app', ['common']);
Second app that is manually bootstrapping
@section footerScript {
angular.bootstrap(document.getElementById('signup'), ['signupApp']);
}
Html
<div id="signup" ng-app="signupApp" ng-controller="SignupController">
<div ui-view></div>
</div>
Controllers created in the second module:
signupModule.controller("SignupController", ['$scope', '$location',
function($scope, $location, $window) {
}
signupModule.controller("PackageInfoController", ['$scope', '$location',
function($scope, $location) {
}
When I run this code I get the error "SignupController" is not a function got undefined and it takes me to this link Error