follow the course, still request mock data of less than 8000 port
"data of port 8000 can be requested directly to
, but request 8000 port
,
help me with some suggestions
follow the course, still request mock data of less than 8000 port
"data of port 8000 can be requested directly to
, but request 8000 port
,
help me with some suggestions
"/api":{
"target":"",
"secure": false,
"changeOrigin": true
}
the document is here: https://doc.webpack-china.org.
is the request to 8000, but there is no request for the interface?
http.get ('/ api/products')
will request localhost:8000/api/products
. If you want to request localhost:8000/products
, you should add pathRewrite
.
1proxy.conf.js<br>2
{
"/api":{
"target":"http://localhost:8000",
"secure": false,
"changeOrigin": true
}
}
3. In the package.json file
"start": "ng serve-- proxy-config proxy.conf.json",
4, npm run start remember that it must be run start, not ng serve,. I cried foolishly by myself
1. At first, I wrote the interface in each component.ts . 2,server.ts ...
nz-table but it is useless, ask the boss to solve it! http: ng-alain.com https: ng.ant.design -sharp compo. ...
1, display configuration document 2i18n.service.ts } 3 ...
Uncaught Error: Template parse errors: md-toolbar is not a known element: 1. If md-toolbar is an Angular component, then verify that it is part of this module. git: https: github.com yyccQQu 0405newNg tree dev my-app ...
I want to see how to close the router page or return to the previous router page after the user enters the page. A prompt box appears when the user clicks OK and then closes or returns. Can bosses do this? ...
as above, I want to change jobs in the next recruitment season. I want to learn ng, from the needs of companies in the market, but it is very difficult. I don t know which version to read first. In fact, I have read the tutorials of angular5 and have so...
for example, now you need to jump between different projects, the backend is not allowed, and the second project needs to get the information of the first project ...