title: Typescript Synchronize method calling
body: <p>Hello Nativescript Team,</p>
  <p>I am mashed up with the method calling.</p>
  <p>Could please guide me How can I implement Sync Method calling in Nativescript + Angular</p>
  <pre><code>import { Component, OnInit, AfterContentInit } from &quot;@angular/core&quot;;
  
  @Component({
      selector: &quot;Home&quot;,
      moduleId: module.id,
      templateUrl: &quot;./home.component.html&quot;,
      styleUrls: ['./home.component.css']
  })
  export class HomeComponent implements OnInit, AfterContentInit {
  
  constructor() {
      this.firstMethod();
      this.secondMethod();
      this.thirdMethod();
      this.fourthMethod();
  }
  
  ngOnInit(): void {
      this.firstInitMethod();
      this.secondInitMethod();
      this.thirdInitMethod();
      this.fourtInitMethod();
  }
  
  private firstInitMethod() {
      console.log(&quot;1 ::::: firstInitMethod method&quot;);
  }
  
  private secondInitMethod() {
      console.log(&quot;2 ::::: secondInitMethod method&quot;);
  }
  
  private thirdInitMethod() {
      console.log(&quot;3 ::::: thirdInitMethod method&quot;);
  }
  
  private fourtInitMethod() {
      console.log(&quot;4 ::::: fourtInithMethod method&quot;);
  }
  
  
  private firstMethod() {
      console.log(&quot;1 ::::: First method&quot;);
  }
  
  private secondMethod() {
      console.log(&quot;2 ::::: second method&quot;);
  }
  
  private thirdMethod() {
      console.log(&quot;3 ::::: third method&quot;);
  }
  
  private fourthMethod() {
      console.log(&quot;4 ::::: fourth method&quot;);
  }
  
  
  ngAfterContentInit() {
      console.log(&quot;ngaftercontnet init method called&quot;);
      this.firstAfterInitMethod();
      this.secondAfterInitMethod();
      this.thirdAfterInitMethod();
      this.fourthAfterInitMethod();
  }
  
  
  private firstAfterInitMethod() {
      console.log(&quot;1 ::::: firstAfterInitMethod method&quot;);
  }
  
  private secondAfterInitMethod() {
      console.log(&quot;2 ::::: secondAfterInitMethod method&quot;);
  }
  
  private thirdAfterInitMethod() {
      console.log(&quot;3 ::::: thirdAfterInitMethod method&quot;);
  }
  
  private fourthAfterInitMethod() {
      console.log(&quot;4 ::::: fourthAfterInitMethod method&quot;);
  }
  </code></pre>
  <p>output result:</p>
  <pre><code>[My Phone 5508]: 1 ::::: First method
  [My Phone 5508]: 2 ::::: secondInitMethod method
  [My Phone 5508]: 3 ::::: thirdInitMethod method
  [My Phone 5508]: 3 ::::: third method
  [My Phone 5508]: 2 ::::: second method
  [My Phone 5508]: 4 ::::: fourtInithMethod method
  [My Phone 5508]: 4 ::::: fourth method
  [My Phone 5508]: ngaftercontnet init method called
  [My Phone 5508]: 1 ::::: firstAfterInitMethod method
  [My Phone 5508]: 2 ::::: secondAfterInitMethod method
  [My Phone 5508]: 1 ::::: firstInitMethod method
  [My Phone 5508]: 3 ::::: thirdAfterInitMethod method
  [My Phone 5508]: 4 ::::: fourthAfterInitMethod method
  </code></pre>
  <p>I need Output method sync calling :</p>
  <pre><code>First methods in Contructor()
  
          this.firstMethod();
          this.secondMethod();
          this.thirdMethod();
          this.fourthMethod();
  Second methods in Init
  
          this.firstInitMethod();
          this.secondInitMethod();
          this.thirdInitMethod();
          this.fourtInitMethod();
  Third methods in AfterInit
  
          this.firstAfterInitMethod();
          this.secondAfterInitMethod();
          this.thirdAfterInitMethod();
          this.fourthAfterInitMethod();
  </code></pre>