title: How to connect postman api to angular4
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>app.component.ts:
  
  import { Component } from '@angular/core';
  import { Http, Response } from '@angular/http';
  import 'rxjs/add/operator/map';
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  })
  export class AppComponent {
    title = 'app will work!!';
    private apiUrl = 'https://address-book-demo.herokuapp.com/api/contacts';
    data: any = {};
    constructor(private http: Http){
    console.log('hellooooooo');
    this.getContacts();
    this.getData();
    }
  
    getData(){
    return this.http.get(this.apiUrl)
     .map((res: Response) =&gt; res.json())
    }
    getContacts(){
     this.getData().subscribe(data =&gt; {
      console.log(data);
      this.data = data;
     })
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I am trying hit the above apiurl and get the data in my console.it is working fine.
  But, When i change the url as "<a href="https://www.getpostman.com/collections/010e61af1" rel="nofollow noreferrer">https://www.getpostman.com/collections/010e61af1</a>......." then i am not able to hit that. (it is giving cross origin issue).</p>
  
  <p>Once, i install CORS plugin it is working fine.</p>
  
  <p>How, can i do that without CORS plugin.</p>
  
  <p>and i am very new to work with postman api.</p>