Can't get Route angular

早过忘川 提交于 2019-12-02 11:25:38

To let your client side application handle the routing. In your server side do the following

var path= require('path');
// All other routes should redirect to the index.html
app.route('/*')
  .get((req, res) => {
    res.sendFile(path.resolve(__dirname + '/client/index.html'));
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!