title: Trigger function if *ngIf is satisfied? angular 2
body: <p>I'm placing an <code>*ngIf</code> condition on one of my buttons that gets displayed if certain fields validate, it calls the <code>geolocation()</code> function on click. Instead I want to automatically trigger this function as soon as <code>ngIf</code> is satisfied. I remember using <code>ng-init</code> for this with angular 1.x, but it doesn't seem to work now nor does <code>*ngInit</code>.</p>
  
  <pre><code>&lt;button *ngIf="!venueNameInput.control.valid &amp;&amp; !address1Input.control.valid" (click)="geolocation()"&gt;Test Dojo Geolocation&lt;/button&gt;
  </code></pre>