title: Memory leaks witht the "angular.module" getter?
body: <p>John Papa recommends chaining instead of creating variables while dealing with modules (see <a href="https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#modules" rel="nofollow">the modules section</a>) :</p>
  
  <blockquote>
    <p>avoid using a variable and instead use chaining with the getter syntax</p>
  </blockquote>
  
  <p>He explains that :</p>
  
  <blockquote>
    <p>this produces more readable code and avoids variable collisions or
    leaks.</p>
  </blockquote>
  
  <p>I'm more comfortable with getting the module in a variable then set it:</p>
  
  <pre><code>var app = angular.module('mymodule');
  app.config(...);
  app.controller(...);
  </code></pre>
  
  <p>and less comfortable with the chaining :</p>
  
  <pre><code>angular.module('mymodule').config(...).controller(...);
  </code></pre>
  
  <p>As i'm coding using Immediately Invoked Function Expression (IIFE), I'm pretty sure that variable collisions would never happen.</p>
  
  <p>But, how about leaks ? Can someone explain or demonstrate how can an Angular app leak because I'm getting a module and storing it in a var ?</p>