AngularJS routing without a web server

后端 未结 5 2099
借酒劲吻你
借酒劲吻你 2020-12-03 08:21

I want to develop html5 SPA application for a thin client. There is no way to launch any web server on it. And I can\'t to make routing works without web server.

My

5条回答
  •  眼角桃花
    2020-12-03 08:51

    Angular is a client-side JS framework, so it doesn't need a web-server. Beside adding the ng-view (as you already figured out), you links need to have a hashbang in front (#/login), unless you're using html5mode.

    So, having a hashbang in URLs is not a drawback, it's an option.

提交回复
热议问题