title: How do I implement ngInit in Angular 8?
body: <p>I am trying to implement [ngInit] in angular 8 code as said in this link <a href="https://stackoverflow.com/questions/37753698/converting-angular-1-to-angular-2-nginit-function/37753794#37753794">ConvertingAngular1To2ngInit</a>
  and it almost worked for me but the problem is it execute more than one time and in some case it go in infinite loop or almost infinite and it crash my page entirely. 
  so i tried to put the function in the html as <code>{{functionName(5)}}</code> and it executed multiple either even if i am putting it in <code>*ngIf</code> directive. 
  i even started new project and just put the function in html at least it executed four time
  i searched a lot for this problem and got stuck in angular life cycle hooks but understood nothing.</p>