title: Ionic and Angular get request going into an infinite execution
body: <p>I am very new to Angular and Ionic framework. I am trying to get some data from a mysql back end. The php returns the right data because I have tested it. The problem, is, when I run the code in the emulator it never stops running. I can confirm this by inspecting the browser and going to console. Below are my simple functions. </p>
  
  <p>In my <strong>service.ts</strong> file, I have a simple function that gets to a php URL.</p>
  
  <pre><code> getLikes(id){
         return this.http.get(this.LIKECOMMENTHANDLER);
      }
  </code></pre>
  
  <p>In my <strong>component.module.ts</strong> file, I used the above function and simply log the response </p>
  
  <pre><code>getLikesCount(id){
      //console.log("my id "+id);
      this.restaurantInfo.getLikes(id).subscribe(
        (response)=&gt; {console.log(response)},
        (error) =&gt; console.log(error)
      );
    }
  </code></pre>
  
  <p>I called the above function in my <strong>template.html</strong> file as follows. </p>
  
  <pre><code>&lt;ion-card *ngFor="let restaurant of restaurants" 
      (click)="navigateToRestaurantDetailsPage('RestaurantDetailsPage', 
      restaurant)"&gt;
      //display restaurant information here then
      &lt;ion-col&gt;
          &lt;button ion-button icon-left clear small&gt;
             &lt;ion-icon name="thumbs-up"&gt;&lt;/ion-icon&gt;
             &lt;div&gt;{‌{getLikesCount(restaurant.id)}}&lt;/div&gt;
          &lt;/button&gt;
       &lt;/ion-col&gt;
  &lt;/ion-card&gt;
  </code></pre>
  
  <p>The code keeps running and never stops and it creates a memory leak. </p>