title: AngularJS - Window alert onload
body: <p>I am just using the fantastic library that is angularJS. I am trying to get a simple window alert to come up on page load. This is the code I am using: </p>
  
  <pre><code>$scope.greet = function() {
      ($window.mockWindow || $window).alert('Hello World');
    }
  }
  </code></pre>
  
  <p>I am new to javascript generally and it seems I have made a mistake with this because it doesn't work: </p>
  
  <p><a href="http://jsfiddle.net/AQ533/5/" rel="nofollow">http://jsfiddle.net/AQ533/5/</a></p>
  
  <p>Can anyone show me what it should be please? Thank you.</p>