Step 1:Go to Your root folder Create proxy.conf.json
{
"/auth/*": {
"target": "http://localhost:8000",
"secure": false,
"logLevel": "debug",
"changeOrigin": true
}
}
_x000D_
Step 2:Go to package.json find "scripts" under that find "start"
"start": "ng serve --proxy-config proxy.conf.json",
_x000D_
Step 3:now add /auth/ in your http
return this.http
.post('/auth/register/', { "username": 'simolee12', "email": '[email protected]', "password": 'Anything@Anything' });
}
_x000D_
Step 4:Final Step in Terminal run npm start