本文介绍了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仅在 ngTouch 模块,因为在移动浏览器中使用时存在延迟.

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

核心 常规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.

这篇关于ngclick已弃用.流行的替代方案或解决方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 15:37