So it's possible to manually bootstrap a module to a chosen html element. But is it possible to do the similar thing with a controller? instead of using ng-controller directive, can you do it from javascript? Let's say your controller function code loads asynchronosly and on the document.ready it's not yet accessible, thus returns undefined.
But is it possible to ng-bind it from the code, once the file with the controller function has loaded? I've tried to add a ng-controller attribute to an element from within javascript code, but of course it didn't work.
You can use the $routeProvider to tell Angular what controller to load for a given view. You do not need to use the ng-controller directive.
From the API reference:
$routeProvider.when('/Book/:bookId/ch/:chapterId', {
templateUrl: 'chapter.html',
controller: ChapterCntl
});