title: angular4 - click function on the div
body: <p>I want to see only div-2 after the page load, then after I click <code>div-2</code>, I want to hide <code>div-2</code> and show <code>div-1</code>.</p>
  
  <pre><code>&lt;div class="div-1"&gt;&lt;p&gt;content 1&lt;/p&gt;&lt;/div&gt;
  &lt;div class="div-2" (click)="on = true"&gt;&lt;p&gt;content 2&lt;/p&gt;&lt;/div&gt;
  </code></pre>