title: Angular 8: Run Component Class Methods Synchronously/Sequentially
body: <p>How do I run methods synchronously in Angular Typescript?
  These are not functions, but methods.
  First one calls a service, and then second saves into an array.</p>
  
  <pre><code>runTwoMethods()
  {
    this.validateAddress();
    this.saveJsonArchive();
  }
  </code></pre>
  
  <p>Validate address may call more sub-method,may not even be Api, so want to wait until everything completes before saving.</p>
  
  <p>Following syntax is for functions, currently searching for class methods,</p>
  
  <p><a href="https://stackoverflow.com/questions/48538814/angular-typescript-call-a-function-after-another-one-has-been-completed">Angular / TypeScript - Call a function after another one has been completed</a></p>
  
  <p>At the end, data is stored into a current data object. And I want to be 
  save to an archive. Maybe another possibility, how do I keep AddressCurrentMailing and JSONArchive[2] in sync?</p>
  
  <p>Current Data object is sourced from API, not sure where (nor I am not allowed to edit the APIs, then calls transformations), and then would like to save into JsonArchive.</p>
  
  <pre><code> this.jsonArchive[this.jsonArchiveCounter] = this.addressCurrentMailingFinalData
  </code></pre>