如何在单击时创建看起来像链接的文本运行控制器功能?

时间:2021-01-10 19:36:19

I have a simple link that a user clicks on when they need to get a password reminder:

我有一个简单的链接,当用户需要获取密码提醒时,用户点击该链接:

<a ng-click="forgotPassword()">Forgot your password?</a>

I tried this but it does not seem to work. I would like the functionality of a link, the look of a link (with an underline appearing on hover) but do not want to have the /# appear in the bottom of the browser when I hover.

我试过这个,但似乎没有用。我想要一个链接的功能,一个链接的外观(在悬停时出现下划线),但是当我悬停时不希望/#出现在浏览器的底部。

Can anyone suggest some ways that I could achieve this with AngularJS?

任何人都可以提出一些方法,我可以通过AngularJS实现这一目标吗?

1 个解决方案

#1


2  

Use a <span class="link" ng-click="forgotPassword()"> tag. Style it with text-decoration: underline; cursor: pointer;, the color you like, etc.

使用标记。用文字装饰风格:下划线; cursor:pointer;,你喜欢的颜色等

#1


2  

Use a <span class="link" ng-click="forgotPassword()"> tag. Style it with text-decoration: underline; cursor: pointer;, the color you like, etc.

使用标记。用文字装饰风格:下划线; cursor:pointer;,你喜欢的颜色等