JavaShuo
欄目
標籤
angular 中配置跨域
時間 2019-11-22
標籤
angular
配置
欄目
AngularJS
简体版
原文
原文鏈接
1. 新建一個 proxy.conf.json
html
{
"/search"
: {
"target"
:
"https://wenku.baidu.com/search"
,
"secure"
:
false
,
"changeOrigin"
:
true
},
"/getnotice"
: {
"target"
:
"https://wenku.baidu.com/message/getnotice"
,
"secure"
:
false
,
"changeOrigin"
:
true
},
"/api"
: {
"target"
:
"https://wenku.baidu.com"
,
"secure"
:
false
,
"changeOrigin"
:
true
}
}
2. 在 package.json 中
node
{
"name"
:
"angular-demo"
,
"version"
:
"0.0.0"
,
"scripts"
: {
"ng"
:
"ng"
,
"start"
:
"
ng serve --proxy-config proxy.config.json
"
,
"build"
:
"ng build"
,
"test"
:
"ng test"
,
"lint"
:
"ng lint"
,
"e2e"
:
"ng e2e"
},
"private"
:
true
,
"dependencies"
: {
"@angular/animations"
:
"~8.1.1"
,
"@angular/common"
:
"~8.1.1"
,
"@angular/compiler"
:
"~8.1.1"
,
"@angular/core"
:
"~8.1.1"
,
"@angular/forms"
:
"~8.1.1"
,
"@angular/platform-browser"
:
"~8.1.1"
,
"@angular/platform-browser-dynamic"
:
"~8.1.1"
,
"@angular/router"
:
"~8.1.1"
,
"axios"
:
"^0.19.0"
,
"redux"
:
"^4.0.4"
,
"rxjs"
:
"~6.4.0"
,
"tslib"
:
"^1.9.0"
,
"zone.js"
:
"~0.9.1"
},
"devDependencies"
: {
"@angular-devkit/build-angular"
:
"~0.801.1"
,
"@angular/cli"
:
"~8.1.1"
,
"@angular/compiler-cli"
:
"~8.1.1"
,
"@angular/language-service"
:
"~8.1.1"
,
"@types/node"
:
"~8.9.4"
,
"@types/jasmine"
:
"~3.3.8"
,
"@types/jasminewd2"
:
"~2.0.3"
,
"codelyzer"
:
"^5.0.0"
,
"jasmine-core"
:
"~3.4.0"
,
"jasmine-spec-reporter"
:
"~4.2.1"
,
"karma"
:
"~4.1.0"
,
"karma-chrome-launcher"
:
"~2.2.0"
,
"karma-coverage-istanbul-reporter"
:
"~2.0.1"
,
"karma-jasmine"
:
"~2.0.1"
,
"karma-jasmine-html-reporter"
:
"^1.4.0"
,
"protractor"
:
"~5.4.0"
,
"ts-node"
:
"~7.0.0"
,
"tslint"
:
"~5.15.0"
,
"typescript"
:
"~3.4.3"
}
}
相關文章
1.
angular中的跨域問題
2.
Angular 跨域
3.
angular之跨域
4.
angular的跨域
5.
跨域配置
6.
ASP.NET 跨域配置
7.
nginx跨域配置
8.
vue跨域配置
9.
springboot跨域配置
10.
SpringBoot 跨域配置
更多相關文章...
•
Eclipse Debug 配置
-
Eclipse 教程
•
Spring中Bean的作用域
-
Spring教程
•
PHP Ajax 跨域問題最佳解決方案
•
IntelliJ IDEA 代碼格式化配置和快捷鍵
相關標籤/搜索
跨域
配置
跨域問題
angular+angular
angular
linux配置
git配置
nginx配置
AngularJS
MyBatis教程
SQLite教程
Redis教程
跨域
註冊中心
0
分享到微博
分享到微信
分享到QQ
每日一句
每一个你不满意的现在,都有一个你没有努力的曾经。
最新文章
1.
安裝cuda+cuDNN
2.
GitHub的使用說明
3.
phpDocumentor使用教程【安裝PHPDocumentor】
4.
yarn run build報錯Component is not found in path 「npm/taro-ui/dist/weapp/components/rate/index「
5.
精講Haproxy搭建Web集羣
6.
安全測試基礎之MySQL
7.
C/C++編程筆記:C語言中的複雜聲明分析,用實例帶你完全讀懂
8.
Python3教程(1)----搭建Python環境
9.
李宏毅機器學習課程筆記2:Classification、Logistic Regression、Brief Introduction of Deep Learning
10.
阿里雲ECS配置速記
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
1.
angular中的跨域問題
2.
Angular 跨域
3.
angular之跨域
4.
angular的跨域
5.
跨域配置
6.
ASP.NET 跨域配置
7.
nginx跨域配置
8.
vue跨域配置
9.
springboot跨域配置
10.
SpringBoot 跨域配置
>>更多相關文章<<