title: Not polluting global with angularjs
body: <p>In angularjs, we define our controllers into <code>window</code>. While this would not create name clashes with other <code>js</code> modules and plugins, it is still not a good practise: a single application should expose a single object to the global namespace.</p>
  
  <p>This is the usual way, defined in <code>window</code>:</p>
  
  <pre><code>function UserController($scope) { ... }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div ng-controller="UserController"&gt;
  </code></pre>
  
  <p>This is what I think of:</p>
  
  <pre><code>myApp.UserController = function ($scope) { ... };
  </code></pre>
  
  <p>So in that case, I should be initiating controller from html like this</p>
  
  <pre><code>&lt;div ng-controller="myApp.UserController"&gt;
  </code></pre>
  
  <p>What do you think?</p>