【发布时间】:2015-02-08 06:52:01
【问题描述】:
知道为什么会这样吗?
我尝试使用
ng-include="'html_template'"
网址结果 WITH ng-include
http://localhost/app/grid#/leave
URL 结果 WITHOUT ng-include
http://localhost/app/grid#leave
注意添加了正斜杠“/”。
【问题讨论】:
-
有人知道吗?
-
这是个谜。没人知道为什么?
-
您能否提供一个 JSFiddle,没有足够的上下文来解决这个问题。
-
您是说使用 ng-include 会导致您的页面从
http://localhost/app/grid#leave重定向到http://localhost/app/grid#/leave?目前还不清楚。 -
@pasine,使用 ng-include 将 '/' 添加到 url 而不是 localhost/app/grid#leave 它变为 localhost/app/grid#/leave
标签: jquery angularjs angularjs-directive angularjs-ng-repeat angularjs-ng-include