ui-sref 和 md-button.这个怎么运作? [英] Ui-sref and md-button. How it works?

查看:29
本文介绍了ui-sref 和 md-button.这个怎么运作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

示例

如果我添加 ui-sref,为什么菜单项Menu1"在其他项之上????

Why menu item "Menu1" above the others if i add ui-sref ????

 <md-button  ui-sref="menu1" >Menu1</md-button>
 <md-button>Menu2</md-button>

推荐答案

如果你使用的是 ui-sref,那么你应该用 Anchor 标签把它括起来.

If you are using ui-sref, then you should enclose it with Anchor tag.

<md-button><a ui-sref="menu1">Menu1</a></md-button>

正如 Hooligancat 所说,这是更新后的代码:

As Hooligancat says, here is the updated Code:

<a ui-sref="menu1" class="md-button">Menu1</a>

希望它有效

这篇关于ui-sref 和 md-button.这个怎么运作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆