Home  >  Q&A  >  body text

javascript - angular 如何在脱离服务器环境下,把不同的html加载到,以切换视图呢?

在没有配置服务器的情况下,如何在本地IDE实现页面嵌套呢

<p ng-app="" ng-controller="studentController">
  <p ng-include="'main.html'"></p>
  <p ng-include="'subjects.html'"></p>
</p>

ng-include貌似是必须配置服务器才能执行 怎么可以脱离服务器执行呢

漂亮男人漂亮男人2704 days ago846

reply all(2)I'll reply

  • 滿天的星座

    滿天的星座2017-05-15 17:16:21

    You can’t do this without service. You should write html and use ng-show to control display and hiding

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-15 17:16:21

    http://stackoverflow.com/a/16...

    reply
    0
  • Cancelreply