2017-05-29 45 views
1

我的文件夾結構,如何加載靜態HTML瀏覽器指向到文件夾

public---| 
     |-index.html 
     |-static-| 
        |-static.html 

當我運行該項目爲localhost:4000,它指向公用文件夾和index.html加載,但現在我想要加載staic.html時 我鍵入本地主機:4000 /靜態但仍然index.html加載任何人都可以請幫助我。提前感謝。

+0

類型這樣本地主機:4000 /靜態/ static.html或重命名static.html到的index.html –

回答

0

解決方法爲Apache

改變你的Apache配置。

此配置元素添加到您的虛擬主機:

<Directory /static/> 
    DirectoryIndex static.html 
</Directory> 
0

請檢查您的角路由的情況下,這可以,如果你有「時」條款指向「/」爲模板發生。

.when("/", { 
 
     templateUrl : "/" 
 
    })