title: How do I execute one line of code after anohter in Angular/Typescript?
body: <p>I am a newbie to Angular. Here I am trying to run the following lines of code sequentially in typescript. How do I do it?</p>
  
  <pre><code>item:any;
  ngOninit() {
     this.paramID = this.http.get(url). // Step 1
                    subscribe(data =&gt; {
                    console.log(data); // Step 2
                    this.item = data;
                    return data;
                    });
  
    console.log(this.item); // Step 3, wait till this.item is initialized
    // Another Async request's response // Step 4
    // Some last line of code // Step 5
  }
  </code></pre>
  
  <p>So, finally it should wait for any subsequent step, before current step is completed.</p>
  
  <p>Expected order is : 
  Step 1 -> Step 2 -> Step 3 -> Step 4 -> Step 5 all in sequence</p>