【问题标题】:Angularjs ng-include html pagesAngularjs ng-include html页面
【发布时间】:2015-10-01 08:38:04
【问题描述】:

您好,我想包含不同的 html 页面, 在我的项目中,必须包含 10 个单击 1 个与 html 相关的图块的图块。像这样,如果我单击 10 个磁贴中的任何一个,则应显示特定页面。任何解决方案

【问题讨论】:

标签: angularjs angularjs-ng-include


【解决方案1】:

如果你想关注rest api,你应该在点击时更改URL。 现在实现 ng-view 以根据 url 在视图中包含特定的 html。 你可以在这里学习路由:https://docs.angularjs.org/api/ngRoute

【讨论】:

  • ng-Route 以外的任何选项,请告诉我
  • 使用 ng-include 本身并表示使用 ng-show 和 ng-hide 在 html 之间切换
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-06-16
  • 2013-11-21
  • 2021-09-17
  • 2014-01-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多