I have a task to integrate RequireJS to existing large ASP.NET application that already has AngularJS code.
The page already bootstraps AngularJS with ng-app='xxx' in master page. I'm trying to create a new controller that will loaded by RequireJS. In HTML I'm defining new div as following
<div ng-controller='someConroller'></div>
someConroller.js loaded by RequireJS after AngularJS has bootsraped, thus I got the following error:
"Argument 'someConroller' is not a function, got undefined"
The problem as I understand is that AngularJS has bootstraped, HTML is loaded, but 'someController' is still doesn't loaded.
How can I cause to AngularJS wait for controller will finish his loading?
Please note that I can't integrate routing.
Please, advise.