从网址传递数据时,公共CSS和JS未加载 [英] Public css and js is not loading while while pass data from url
问题描述
->http://localhost:8000/edit-category
-> http://localhost:8000/edit-category
->http://localhost:8000/public/assets/images/users/avatar-1.jpg
-> http://localhost:8000/public/assets/images/users/avatar-1.jpg
->http://localhost:8000/edit-category/12
-> http://localhost:8000/edit-category/12
->http://localhost:8000/edit-category/public/assets/images/users/avatar-1.jpg
-> http://localhost:8000/edit-category/public/assets/images/users/avatar-1.jpg
如果我从url中删除了edit-category,那么所有的CSS和JS都会呈现
if i remove edit-category from url then all css and js will render
任何人都可以帮助我在Express节点上解决此问题.
Can anyone help me to solve this problem in node with express.
推荐答案
在头部使用< BaseUrl/>
标记.这样可以解决问题
Use <BaseUrl />
tag in head.
this will solve the problem
这篇关于从网址传递数据时,公共CSS和JS未加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!