title: save email in local storage angular-cli
body: <p>So I use Angular CLI. I'd like to save email in Local storage. My html code:</p>
  
  <pre><code>&lt;input type="text" name="email_field" id="email"&gt; 
  &lt;input type="submit" value="registration" onclick="save_email()"&gt;
  </code></pre>
  
  <p>My type script code:</p>
  
  <pre><code>function save_email(){
      let idemail = document.getElementById('email');
      localStorage.setItem('email', this.idemail.value);
  }
  </code></pre>
  
  <p>After click button this component close and  nothing put into storage. How to fix it?</p>