AngularJS routing without a web server

后端 未结 5 2096
借酒劲吻你
借酒劲吻你 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 09:17

    After a while, I made it works.

    At first, I moved this piece into separate file

    • {{number}}

    Secondly, in index.html I've added this div

    It is used as a view placeholder.

    Now index.html is used as "master page" or "layout" if you are familiar with asp.net. When you clicking at the link, content of the templateUrl file is inserting into placeholder div.

    A drawback of this is that url should looks like this

提交回复
热议问题