nodejs-tw / ama

Ask me anything!
MIT License
31 stars 1 forks source link

使用AngularJs 問題 #26

Open z0890142 opened 7 years ago

z0890142 commented 7 years ago

目的

希望使用AngularJs 當作前端

遇到的問題

因為剛接觸express 上網爬文看到在express的app.js檔案裡使用 app.get('/', function(req, res) { res.sendfile('./views/p1.html'); // load the single view file (angular will handle the page changes on the front-end) }); 這句可以讓node.js連接上我所編輯的AngularJs ,可是不知道為什麼我設了都沒有作用,如果我public的資料夾裡有index.html這個檔案他就會跑這個檔案,如果沒有她就會跑隨著專案產生的index.jade,我想請問一下是哪裡出了問題