title: django rest framework api and angular 2 integration
body: <p>I'm developing back-end API with Django Rest Framework and front-end with Angular 2. The django server runs on localhost:8000 and the angular server runs on localhost:3000. When I try to access API using angular 2, it gives me the following error:<br><Br></p>
  
  <blockquote>
    <p><em>customerregister:1 XMLHttpRequest cannot load <a href="http://127.0.0.1:8000/user/signup" rel="nofollow noreferrer">http://127.0.0.1:8000/user/signup</a>. Response to preflight request
    doesn't pass access control check: No 'Access-Control-Allow-Origin'
    header is present on the requested resource. Origin
    '<a href="http://localhost:3000" rel="nofollow noreferrer">http://localhost:3000</a>' is therefore not allowed access.</em><br><br></p>
  </blockquote>
  
  <p>What I want to ask is how to integrate the development of Django Rest API and angular 2 project.</p>