title: How to get return value from subscriber function in angular?
body: <p>I am calling a function which has a subscriber function in it. This function must return an array, but it's giving an error:</p>
  
  <blockquote>
    <p>subscription is missing.</p>
  </blockquote>
  
  <pre><code>get():obeservable&lt;cat[]&gt;{
         return this.service.getsamples().subscriber(response=&gt;{
                return &lt;cat[]&gt;(response);
         });
  }
  
  getSamples(){
         return this.http.get(this.url)
              .map(response=&gt;{
               return &lt;cat[]&gt;response
              });
  }
  </code></pre>
  
  <p>How to achieve this?</p>