title: how to check the response status in component.ts to call another service in Angular 5
body: <p>I am catching the status code in my service from below code:</p>
  
  <pre><code>add(new: Add): Observable&lt;Response&gt; {
    return this.http
     .post(this.addURL, new , httpOptions)
       .map((response: Response) =&gt; {
        if (response) {
         if (response.status === 200) {
          return [{ status: response.status, response: &lt;Response&gt;response.json() }]
                  }
              }
          })
          .catch(this.handleError);
  }
  </code></pre>
  
  <p>Here is my component.ts code where I want to call the list after successful add</p>
  
  <pre><code>  addDetails(): void {
  var new = this.form.value.array;
  new = JSON.stringify(this.form.value.array);
  this.addService.add(new)
    .subscribe(
    resultArray =&gt; this.Response = resultArray,
    error =&gt; console.log("Error :: " + error),    
    )
    if(Response.status ===200){
      this.getList();   
    }}
  </code></pre>
  
  <p>but I am getting the below error:
  <strong>Property 'status' does not exist on type 'typeof Response'</strong></p>