For running function in AngularJS controller on document ready you can use the angular.element(document).ready() method to attach callbacks for when the document is ready.
Are you interested in learning Angularjs from the basics! Here's the right video for you on Angularjs provided by Intellipaat:
You can simply attach the callback in the controller as follows:-
angular.module('MyApp', [])
.controller('MyCtrl', [function() {
angular.element(document).ready(function () {
document.getElementById('msg').innerHTML = 'Hello';
});
}]);