m7r/grunt-ngdocs — pull request #75 by stephenliberty (2014-02-26 21:06:03+00:00)
Title: Making the actual app load deferrable

We had an interesting case where our require.js based application would sometimes load and sometimes not load, due to the documentation app loading before it. I think the best way to mitigate problems like this would be to allow the user of the documentation app to completely defer the loading until they're ready. In our simple case, I just included the few files that needed to be included, then ran `angular.bootstrap(document, ['docsApp']);`. Because I was able to do this in a require call, the app was properly loaded and the only oddity was seeing the code render. But, for a documentation app, we weren't too concerned (though if it was a problem I'm sure that the ng-cloak could be applied if deferLoad is set to true).