[英]Angular ui.router anchor tags issue
我是angularjs的新手。 我已经使用角度UI路由器创建了一个嵌套视图。 我在这里面临的问题是锚标记不可单击。 我无法找出问题所在。 任何帮助表示赞赏。
文件夹结构: -
AngularUiRouterProject
|-controllers
|-child_one.js /*Child_one Controller*/
|-child_two.js /*Child_two Controller*/
|-page_one.js /*Page_one Controller*/
|-page_two.js /*Page_two Controller*/
|-templates
|-page_one.html /*Parent One Template*
|-page_two.html /*Parent_two Template*/
|-child_one.html /*Child_one Template*/
|-child_two.html /*Child_Two Template*/
|-app.js /*Angular Module File*/
|-config.js /*Ui Router Config File*/
|-index.html /*Main Page*/
这是Plunker Link AngularUiRouterProject
ui-sref
将state
作为值而不是url
。 从ui-sref
删除\\
,然后变成状态名称
请注意,为了使插件更有效,我必须从templateUrl:"templates\\page_two.html",
删除目录名称templates
以使路由起作用templateUrl:"templates\\page_two.html",
您可以根据需要进行修改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.