美文网首页
angular 搭建后台发现的bug

angular 搭建后台发现的bug

作者: 微笑城ios | 来源:发表于2021-02-07 14:07 被阅读0次

使用angular 搭建后台发现的一些问题

  1. 使用post 登录之后可以保存会话的session , 但是使用自己搭建的 网络请求不行
## 需要在网络请求的头部添加上  ==> 之前自己没做记录 , 后来发现 找了1个小时 , 差点把自己气死了
withCredentials: true
  1. 发布版本到服务器以后, 发现 报错 : The requested URL /home/tools/wrong was not found on this s...
### 找到发布文件下面添加 文件 
vim .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>

### apache 服务下 亲测有效

相关文章

网友评论

      本文标题:angular 搭建后台发现的bug

      本文链接:https://www.haomeiwen.com/subject/mijztltx.html