title: How to make a delay in angular 2
body: <p>I am trying to set a delay for a display in my app. 
  After I run the program, the message is displayed correctly and stays instead of displaying for just 4 seconds. This my delay function. What could be wrong</p>
  
  <pre class="lang-js prettyprint-override"><code> display(){    
        this.foodservice.getFood()
            .subscribe(data =&gt; 
            {
               delay (4000)
               this.display =""
            });
     }
  </code></pre>