Javascript 如何在指向文件夹的浏览器中加载静态html
我的文件夹结构Javascript 如何在指向文件夹的浏览器中加载静态html,javascript,html,css,angularjs,directory,Javascript,Html,Css,Angularjs,Directory,我的文件夹结构 public---| |-index.html |-static-| |-static.html 当我以localhost:4000运行该项目时,它指向公用文件夹并加载index.html,但现在我想在 我键入localhost:4000/static,但仍然加载index.html。有人能帮我吗?提前谢谢。Apache的解决方案 更改您的Apache配置 将此配置元素添加到VHost: <Direc
public---|
|-index.html
|-static-|
|-static.html
当我以localhost:4000运行该项目时,它指向公用文件夹并加载index.html,但现在我想在
我键入localhost:4000/static,但仍然加载index.html。有人能帮我吗?提前谢谢。Apache的解决方案 更改您的Apache配置 将此配置元素添加到VHost:
<Directory /static/>
DirectoryIndex static.html
</Directory>
DirectoryIndex static.html
Apache的变通方法
更改您的Apache配置
将此配置元素添加到VHost:
<Directory /static/>
DirectoryIndex static.html
</Directory>
DirectoryIndex static.html
请检查您的角度布线情况,如果您有指向模板“/”的“when”子句,则可能发生这种情况
。当(“/”时{
模板URL:“/”
})
请检查您的角度布线情况,如果您有指向模板“/”的“when”子句,则可能发生这种情况
。当(“/”时{
模板URL:“/”
})
以这种方式键入localhost:4000/static/static.html或将static.html重命名为index.htmltype以这种方式键入localhost:4000/static/static.html或将static.html重命名为index.html