title: How to enable form autocomplete in angular application
body: <p>I migrated an app to Angular and now it does not autocomplete the form upon returning page visits. Otherwise it works perfectly fine.</p>
  
  <p>My gut feeling is that it has to do with the *ngIf template expressions and just the general non-static nature of Angular but I'm wondering if there's anything I can do to perhaps enable the form to autofill? </p>
  
  <p><strong>login.component.html:</strong></p>
  
  <pre><code>&lt;div class="container"&gt;
    &lt;div class="row"&gt;
      &lt;div class="col"&gt;
        &lt;hr&gt;
        &lt;form autocomplete="on"&gt;
          &lt;div class="form-group"&gt;
            &lt;input type="email" class="form-control" placeholder="Email address" name="email" required [(ngModel)]="email" autocomplete="email"/&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
            &lt;input type="password" class="form-control" placeholder="Password" name="password" required [(ngModel)]="pass" /&gt;
          &lt;/div&gt;
          &lt;hr&gt;
          &lt;div class="form-group"&gt;
            &lt;button (click)="Register()"&gt;Register&lt;/button&gt;
            &lt;button (click)="Login()"&gt;Sign In&lt;/button&gt;
          &lt;/div&gt;
        &lt;/form&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>app.component.html:</strong></p>
  
  <pre><code>&lt;app-login *ngIf="!loggedIn"&gt;&lt;/app-login&gt;
  </code></pre>