ngclick已弃用.流行的替代方案或解决方案?

问题描述:

我是新手. ng-click似乎是一个漂亮的核心指令,我不明白如何在不使用ng-click的情况下制作应用.我想念什么吗?显然它已被弃用.文档指向我指向fastclick,但这不是一个有角度的实现.

I'm new to angular. ng-click seems like a pretty core directive, I don't understand how you can make an app without ng-click. Am I missing something? Apparently it's deprecated. And the docs point me to fastclick but that's not an angular implementation.

是否有流行的ng-click弃用方式?为此,我在凉亭上找不到任何流行的包装.谢谢.

Is there a popular non-deprecated way of doing what ng-click did? I couldn't find any popular packages on bower for this. Thanks.

ng-click仅在

ng-click is only being deprecated within the ngTouch module due to delays when used in mobile browsers.

从Angular 1.5开始,该指令已被弃用,默认情况下被禁用.该指令将不再获得支持,并且可能会从将来的版本中删除.如果需要该指令,则可以使用 $启用它touchProvider#ngClickOverrideEnabled 函数.我们还建议您迁移到 FastClick .要了解有关300毫秒延迟的更多信息,请参见 Telerik文章提供了很好的概述.

Beginning with Angular 1.5, this directive is deprecated and by default disabled. The directive will receive no further support and might be removed from future releases. If you need the directive, you can enable it with the $touchProvider#ngClickOverrideEnabled function. We also recommend that you migrate to FastClick. To learn more about the 300ms delay, this Telerik article gives a good overview.

核心常规ngClick >模块将不受影响.

Regular ngClick in the core ng module will remain unaffected.

如果确实需要使用fastclick作为替代方法,则可以使用几种角度包裹的版本. 一个

If you do infact need to use fastclick as an alternative there are a couple of angular wrapped versions available. One, Two.