MGJD - Document.Ready in AngularJS
Learn How to manually bootstrap AngularJS
by codef0rmer
HTML
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css">
<div class="alert alert-success">{{bootstrapper}}</div>
JavaScript
var App = angular.module('App', []);
App.run(function($rootScope) {
$rootScope.bootstrapper = 'You have successfully bootstrapped AngularJS';
});
angular.element(document).ready(function() {
angular.bootstrap(document, ['App']);
// Target any specific tag instead
// angular.bootstrap(jQuery('body'), ['App']);
});