title: Property 'api' does not exist on type 'MyService'. any
body: <p>I am following a tutorial on which we create an Angular service for sending emails from
  a form using Mailthis Email API.
  In the service code I get an error on the 'api' word that says
  &quot; Property 'api' does not exist on type 'MyService' &quot;.
  Any advice will be very helpfull!</p>
  <p>My code is:</p>
  <pre><code>import { Injectable } from '@angular/core';
  import { HttpClient } from '@angular/common/http';
  import { map } from 'rxjs/operators';
  
  @Injectable({
    providedIn: 'root'
  })
  export class MyService {
  
  
      constructor(private http:HttpClient
                ) { }
  
  
      PostMessage(input:any){
  
          return this.http.post(this.api, input, { responseType:'text' }).pipe(
              map(
                  (response:any) =&gt; {
                      if(response){
                          return response;
                      }
                  },
                  (error:any) =&gt; {
                      return error;
                  }
              )
          )
  
      }
  
  
  }
  
  </code></pre>