我試圖找回這是另一個port.I運行如下訪問控制允許來源的錯誤和angular2
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.
我的服務我得到一個錯誤服務.ts文件如下提前
這些標題應該在服務器端沒有客戶端應用程序設置.. https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS –
有任何替代將它們設置在客戶端? – sravanthi
nope ..你應該設置你的服務器端CORS –